UA Server SDK C++ Bundle
1.4.3.291
|
#include <uafileengine.h>
Inherits UaAbstractFileEngine.
Public Member Functions | |
UaFileEngine () | |
construction | |
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-sensitive 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 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 UaUniString | canonicalPath (const UaUniString &sPath) const |
Returns the canonical path, i.e. 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 OpcUa_UInt16 | count (const UaUniString &sPath) const |
Returns the total number of directories and files in the directory (including "." and "..") 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 (/home/<username>/.config). More... | |
virtual UaUniString | systemApplicationDataPath () const |
Get the path to the application folder (/etc/xdg). More... | |
|
virtual |
Get the path to the application folder (/home/<username>/.config).
|
virtual |
Returns the canonical path, i.e.
a path without symbolic links or redundant "." or ".." elements. On systems that do not have symbolic links this function will always return the same string that absolutePath() returns. If the canonical path does not exist (normally due to dangling symbolic links) canonicalPath() returns an empty string. Example:
|
virtual |
This method checks if the underlying OS is case-sensitive or not.
|
virtual |
|
virtual |
Closes a file opened with openFile().
pFile | the file to close. |
|
virtual |
The copy function copies an existing file (fileName) to an new file with the name newName.
fileName | the original file name to copy. |
newName | the new name of the copied file. |
|
virtual |
Returns the total number of directories and files in the directory (including "." and "..")
sPath | the path to the directory where to count all the files and dirs. |
|
virtual |
Create a new file with the name sFileName and opens it for writing.
The file will be created with the rights 640.
sPath | path to the new file. |
sFileName | the name of the new file. |
|
virtual |
Returns a list of the names of all the files and directories in the directory, ordered according to the name and attribute filters.
The attribute filter and sorting specifications can be overridden using the filters and sort arguments.
|
virtual |
This method checks if the given path sPath still exists or not.
sPath | the path to the file / directory. |
|
virtual |
Returns the size of a file.
fileName | the path to the file. |
|
virtual |
Returns the absolute path of the user's home directory.
Typically, this is:
|
virtual |
Returns true if sPath is relative; returns false if it is absolute.
A unixpath is relative if it does not start with a "/".
|
virtual |
Create a hard link to a new file.
Establishes a hard link between an existing file and a new file.
fileName | path to the file to link with. |
newName | the new name of the linked file. |
|
virtual |
Creates the directory dirName.
The directory will be created with mod 750.
dirName | the directory to create. |
|
virtual |
Opens a file.
fileName | the path to the file. |
mode | the open mode (see fopen for details). |
|
virtual |
Reads data from a file opened with openFile().
pData | a buffer to store the read data. |
size | the size of a single element to be read. |
count | the number of elements to read. |
pFile | the file to read from. |
|
virtual |
Removes the file sFileName.
sFileName | the file to remove. |
|
virtual |
Renames the file fileName with the new name newName.
fileName | the file to rename. |
newName | the new name for the file. |
|
virtual |
Removes the directory dirName.
dirName | the directory to remove. |
|
virtual |
Get the path to the application folder (/etc/xdg).
|
virtual |
Writes data to a file opened with openFile().
pData | the array of data to write. |
size | the size of a single array item. |
count | the number of array items. |
pFile | the file to write to. |