Vuo  0.5.3
 All Classes Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Groups Pages
Public Member Functions | Friends | List of all members
VuoFileUtilities::File Class Reference

Description

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
 

Constructor & Destructor Documentation

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.

Member Function Documentation

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.

Parameters
[out]numBytesThe size of the returned array.
Returns
The array of bytes. The caller is responsible for freeing it.
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.


The documentation for this class was generated from the following files: