|
VizKit
3.3.7
|
Path information of file or directory and related operations. More...
#include <VisualFile.h>
Public Member Functions | |
| VisualFile () | |
| The constructor. | |
| ~VisualFile () | |
| The destructor. | |
| VisualFile (const VisualFile &other) | |
| Copy constructor. | |
| VisualFile & | operator= (const VisualFile &other) |
| Assignment operator. | |
| bool | initWithDirectoryOfTemporaryItems (void) |
| Initializes the file with the directory of temporary items. | |
| bool | initWithUserDesktopDirectory (void) |
| Initializes the file with the destop directory of the current user. | |
| bool | initWithPreferenceStoreDirectory (void) |
| Initializes the file with the directory where the preferences are stored. | |
| virtual VisualFile * | clone (void) const |
| Copies the current VisualFile and returns a pointer to a new VisualFile. | |
| bool | appendFileName (VisualString &aFileName) |
| Appends a file name to the VisualFile. | |
| bool | open (void) |
| Opens the file for write access. | |
| bool | close (void) |
| Closes the file. | |
| bool | getData (void **data, size_t &size) |
| Returns the data of the file. | |
| bool | remove (void) |
| Deletes the file. | |
| void | getFilePath (VisualString &filePath) const |
| Returns the file path as VisualString. | |
| bool | getSize (size_t &size) const |
| Returns the size of the file in bytes. | |
Static Public Member Functions | |
| static VisualFile * | createWithDirectoryOfTemporaryItems (void) |
| Creates a file with the directory of temporary items. | |
| static VisualFile * | createWithUserDesktopDirectory (void) |
| Creates a file with the destop directory of the current user. | |
| static VisualFile * | createWithPreferenceStoreDirectory (void) |
| Creates a file with the directory into which the preferences are stored. | |
| static bool | writeDataToFile (void **data, size_t size, VisualFile &aFile) |
| Writes the passed in data bytes into a file. | |
Private Member Functions | |
| void | copy (const VisualFile &other) |
| Copy method for assignment operator and copy constructor. | |
| void | clear (void) |
| Resets internally used variables and releases allocated memory. | |
| sint8 | readData (char *buffer, size_t &numberOfbytes, uint32 startOffset=0) |
| Reads data from the file. | |
Private Attributes | |
| bool | isDirectory |
| True if VisualFile denotes a directory. | |
| bool | knownWhetherFileOrDirectoryExists |
| True if it is known whethere a file or directory at the location of the VisualFile exists. | |
| bool | doesExistBool |
| True if a file or directory at the location of the VisualFile exists. | |
Path information of file or directory and related operations.
The constructor.
The destructor.
| VisualFile::VisualFile | ( | const VisualFile & | other | ) |
Copy constructor.
| other | Reference to another VisualFile. |
| bool VisualFile::appendFileName | ( | VisualString & | aFileName | ) |
Appends a file name to the VisualFile.
| aFileName | A file name. |
| void VisualFile::clear | ( | void | ) | [private] |
Resets internally used variables and releases allocated memory.
| VisualFile * VisualFile::clone | ( | void | ) | const [virtual] |
Copies the current VisualFile and returns a pointer to a new VisualFile.
Implements VizKit::VisualObject.
| bool VisualFile::close | ( | void | ) |
Closes the file.
| void VisualFile::copy | ( | const VisualFile & | other | ) | [private] |
Copy method for assignment operator and copy constructor.
| other | Another VisualFile. |
| VisualFile * VisualFile::createWithDirectoryOfTemporaryItems | ( | void | ) | [static] |
Creates a file with the directory of temporary items.
| VisualFile * VisualFile::createWithPreferenceStoreDirectory | ( | void | ) | [static] |
Creates a file with the directory into which the preferences are stored.
| VisualFile * VisualFile::createWithUserDesktopDirectory | ( | void | ) | [static] |
Creates a file with the destop directory of the current user.
| bool VisualFile::getData | ( | void ** | data, |
| size_t & | size | ||
| ) |
Returns the data of the file.
| [out] | data | A pointer to a pointer to the data of the file. |
| [out] | size | The size of the read data in bytes. |
| void VisualFile::getFilePath | ( | VisualString & | filePath | ) | const |
Returns the file path as VisualString.
| [out] | filePath | The file path as VisualString. |
| bool VisualFile::getSize | ( | size_t & | size | ) | const |
Returns the size of the file in bytes.
| [out] | size | The size of the file in bytes. |
| bool VisualFile::initWithDirectoryOfTemporaryItems | ( | void | ) |
Initializes the file with the directory of temporary items.
| bool VisualFile::initWithPreferenceStoreDirectory | ( | void | ) |
Initializes the file with the directory where the preferences are stored.
| bool VisualFile::initWithUserDesktopDirectory | ( | void | ) |
Initializes the file with the destop directory of the current user.
| bool VisualFile::open | ( | void | ) |
Opens the file for write access.
| VisualFile & VisualFile::operator= | ( | const VisualFile & | other | ) |
Assignment operator.
| other | Reference to another VisualFile. |
| sint8 VisualFile::readData | ( | char * | buffer, |
| size_t & | numberOfbytes, | ||
| uint32 | startOffset = 0 |
||
| ) | [private] |
Reads data from the file.
| [in,out] | buffer | The buffer into which the data is to be written. |
| [in,out] | numberOfbytes | The number of bytes requested. The actual number of bytes written on return. |
| startOffset | The offset from where reading is supposed to begin. |
| bool VisualFile::remove | ( | void | ) |
Deletes the file.
| bool VisualFile::writeDataToFile | ( | void ** | data, |
| size_t | size, | ||
| VisualFile & | aFile | ||
| ) | [static] |
Writes the passed in data bytes into a file.
| data | A pointer to a pointer to the data to write into file. |
| size | The number of bytes of the data. |
| aFile | The file into which to write the data. |
bool VizKit::VisualFile::doesExistBool [private] |
True if a file or directory at the location of the VisualFile exists.
False if not.
bool VizKit::VisualFile::isDirectory [private] |
True if VisualFile denotes a directory.
False if VisualFile denotes a file.
bool VizKit::VisualFile::knownWhetherFileOrDirectoryExists [private] |
True if it is known whethere a file or directory at the location of the VisualFile exists.
False if not known.