Inherits UaAbstractFileEngine, UaAbstractFileEngine, UaAbstractFileEngine, UaAbstractFileEngine, UaAbstractFileEngine, and UaAbstractFileEngine.
|
| UaFileEngine () |
| construction More...
|
|
virtual | ~UaFileEngine () |
| destruction
|
|
virtual bool | remove (const UaUniString &sFileName) const |
| Removes the file sFileName. More...
|
|
virtual bool | copy (const UaUniString &fileName, const UaUniString &newName) const |
| The copy function copies an existing file (fileName) to an new file with the name newName. More...
|
|
virtual bool | rename (const UaUniString &fileName, const UaUniString &newName) const |
| Renames the file fileName with the new name newName. More...
|
|
virtual bool | link (const UaUniString &fileName, const UaUniString &newName) const |
| Create a hard link to a new file. More...
|
|
virtual bool | mkdir (const UaUniString &dirName) const |
| Creates the directory dirName. More...
|
|
virtual bool | rmdir (const UaUniString &dirName) const |
| Removes the directory dirName. More...
|
|
virtual bool | caseSensitive () const |
| This method checks if the underlying OS is case sensitiv or not. More...
|
|
virtual bool | isRelativePath (const UaUniString &sPath) const |
| Returns true if sPath is relative; returns false if it is absolute. More...
|
|
virtual bool | cd (const UaUniString &sDirName) const |
| Changes the UaDir's directory to sDirName. More...
|
|
virtual bool | createFile (const UaUniString &sPath, const UaUniString &sFileName) const |
| Create a new file with the name sFileName and opens it for writing. More...
|
|
virtual bool | exists (const UaUniString &sPath) const |
| This method checks if the given path sPath still exists or not. More...
|
|
virtual FILE * | openFile (const UaUniString &fileName, const UaUniString &mode) const |
| Opens a file. More...
|
|
virtual OpcUa_Int64 | writeFile (const void *pData, OpcUa_Int64 size, OpcUa_Int64 count, FILE *pFile) const |
| Writes data to a file opened with openFile(). More...
|
|
virtual OpcUa_Int64 | readFile (void *ptr, OpcUa_Int64 size, OpcUa_Int64 count, FILE *pFile) const |
| Reads data from a file opened with openFile(). More...
|
|
virtual OpcUa_Int64 | readLine (char *pData, OpcUa_Int64 maxSize, FILE *pFile) const |
| Reads one line from a text file opened with openFile(). More...
|
|
virtual OpcUa_Int64 | pos (FILE *pFile) const |
| Returns the current value of the position. More...
|
|
virtual bool | seek (OpcUa_Int64 pos, FILE *pFile, int origin) const |
| Set the current position to the position specified. More...
|
|
virtual bool | closeFile (FILE *pFile) const |
| Closes a file opened with openFile(). More...
|
|
virtual OpcUa_Int64 | getFileSize (const UaUniString &fileName) const |
| Returns the size of a file. More...
|
|
virtual UaUniStringList | entryList (const UaUniString &sPath, int filters=UaDir::NoFilter, int sort=UaDir::NoSort) const |
| Returns a list of the names of all the files and directories in the directory, ordered according to the name and attribute filters. More...
|
|
virtual UaUniString | canonicalPath (const UaUniString &sPath) const |
| NOT supported under INtime. More...
|
|
virtual UaUniString | homePath () const |
| Returns the absolute path of the user's home directory. More...
|
|
virtual UaUniString | applicationDataPath () const |
| Get the path to the application folder. More...
|
|
virtual UaUniString | systemApplicationDataPath () const |
| Get the path to the application folder. More...
|
|
virtual OpcUa_UInt16 | count (const UaUniString &sPath) const |
| Returns the total number of directories and files in the directory (including "." and "..") More...
|
|
bool UaFileEngine::isRelativePath |
( |
const UaUniString & |
sPath | ) |
const |
|
virtual |
Returns true if sPath is relative; returns false if it is absolute.
Checks if a directory path is an absolute path or a relative path.
Converts the directory path to an absolute path.
A unixpath is relative if it does not start with a "/".
If it is already absolute nothing happens.
- Returns
- true if sPath is relative; returns false if it is absolute.
-
true if sPath is relative; returns false if it is absolute.
bool UaFileEngine::mkdir |
( |
const UaUniString & |
dirName | ) |
const |
|
virtual |
Creates the directory dirName.
Creates a sub-directory called dirName.
The directory will be created with mod 750.
- Parameters
-
dirName | the directory to create. |
- Returns
- true if successful false if not.
The directory will be created with mod 750.
- Parameters
-
dirName | the directory to create. |
- Returns
- true if successful, false if not.
Returns true on success; otherwise returns false.
- Parameters
-
dirName | the directory to create. |
- Returns
- true if successful false if not.
- See also
- rmdir()
Renames the file fileName with the new name newName.
Renames a file or directory from fileName to newName, and returns true if successful; otherwise returns false.
- Parameters
-
fileName | the file to rename. |
newName | the new name for the file. |
- Returns
- true if successful false if not.
- Parameters
-
fileName | the file to rename. |
newName | the new name for the file. |
- Returns
- true if successful, false if not.
On most file systems, rename() fails only if fileName does not exist, if newName and fileName are not on the same partition or if a file with the new name already exists. However, there are also other reasons why rename() can fail. For example, on at least one file system rename() fails if newName points to an open file.
- Parameters
-
fileName | the file to rename. |
newName | the new name for the file. |
- Returns
- true if successful false if not.