Vuo
0.9.1
|
A file in either a directory or an archive.
Public Member Functions | |
File (string dirPath, string filePath) | |
Creates a reference to a file that is in a directory. | |
~File (void) | |
If this file is in an archive and it was the last File object using the Archive object, closes the archive. | |
bool | isInArchive (void) |
Returns true if this file is inside an archive. | |
string | getArchivePath (void) |
Returns the path of the archive that contains this file. | |
string | getRelativePath (void) |
Returns the path of the file, relative to its enclosing directory or archive. | |
char * | getContentsAsRawData (size_t &numBytes) |
Returns the contents of the file as an array of bytes. | |
string | getContentsAsString (void) |
Returns the contents of the file as a string. | |
Friends | |
class | VuoFileUtilities |
VuoFileUtilities::File::File | ( | string | dirPath, |
string | filePath | ||
) |
Creates a reference to a file that is in a directory.
VuoFileUtilities::File::~File | ( | void | ) |
If this file is in an archive and it was the last File object using the Archive object, closes the archive.
string VuoFileUtilities::File::getArchivePath | ( | void | ) |
Returns the path of the archive that contains this file.
If this file is not inside an archive, returns an empty string.
char * VuoFileUtilities::File::getContentsAsRawData | ( | size_t & | numBytes | ) |
Returns the contents of the file as an array of bytes.
[out] | numBytes | The size of the returned array. |
string VuoFileUtilities::File::getContentsAsString | ( | void | ) |
Returns the contents of the file as a string.
string VuoFileUtilities::File::getRelativePath | ( | void | ) |
Returns the path of the file, relative to its enclosing directory or archive.
bool VuoFileUtilities::File::isInArchive | ( | void | ) |
Returns true if this file is inside an archive.