ChaiLove API  0.28.0
Public Member Functions
love::Types::FileSystem::FileData Class Reference

Information about a file. More...

Public Member Functions

 FileData (const std::string &filepath)
 Creates a new FileData from a file on the storage device. More...
 
 FileData (const std::string &contents, const std::string &name)
 Creates a new FileData from the given data and filename. More...
 
int getSize ()
 The size of the Data in bytes.
 
std::string getFilename ()
 Gets the filename of the FileData.
 
std::string getString ()
 Gets the full Data as a string.
 
std::string getExtension ()
 Gets the extension of the FileData.
 

Detailed Description

Information about a file.

See also
love.filesystem.newFileData

Constructor & Destructor Documentation

◆ FileData() [1/2]

love::Types::FileSystem::FileData::FileData ( const std::string &  filepath)

Creates a new FileData from a file on the storage device.

Parameters
filepathPath to the file.

◆ FileData() [2/2]

love::Types::FileSystem::FileData::FileData ( const std::string &  contents,
const std::string &  name 
)

Creates a new FileData from the given data and filename.

Parameters
contentsThe data for the file.
nameThe filename of the file.