C++ Based OPC UA Client/Server SDK
1.5.3.346
|
#include <uafileengine.h>
Inherits UaAbstractFileEngine, UaAbstractFileEngine, UaAbstractFileEngine, UaAbstractFileEngine, UaAbstractFileEngine, and UaAbstractFileEngine.
Public Member Functions | |
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 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 |
NOT supported under INtime. 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. More... | |
virtual UaUniString | systemApplicationDataPath () const |
Get the path to the application folder. More... | |
UaFileEngine::UaFileEngine | ( | ) |
construction
function pointer to PathIsRelativeWType
construction
|
virtual |
Get the path to the application folder.
Get the path to the application folder (<username>\Application Data).
Get the path to the application folder (/home/<username>/.config).
|
virtual |
NOT supported under INtime.
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 sensitiv or not.
Nothing to do under Win.
This method checks if the underlying OS is case-sensitive or not.
|
virtual |
Changes the UaDir's directory to sDirName.
Returns true if the new directory exists and is readable; otherwise returns false. Note that the logical cd() operation is not performed if the new directory does not exist.
|
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.
The copy function copies an existing file to an new file.
fileName | the original file name to copy. |
newName | the new name of the copied file. |
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. |
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.
Create a new file 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. |
The file will be created with the rights 640.
sPath | path to the new file. |
sFileName | the name of the new file. |
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.
This method checks if the given path 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:
Typically, this is:
Under Windows this function will return the directory of the current user's profile. Typically, this is:
|
virtual |
Returns true if sPath is relative; returns false if it is absolute.
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.
|
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. |
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.
Creates a sub-directory called dirName.
The directory will be created with mod 750.
dirName | the directory to create. |
The directory will be created with mod 750.
dirName | the directory to create. |
Returns true on success; otherwise returns false.
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.
Removes the file, fileName.
sFileName | the file to remove. |
sFileName | the file to remove. |
|
virtual |
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.
fileName | the file to rename. |
newName | the new name for the file. |
fileName | the file to rename. |
newName | the new name for the file. |
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.
fileName | the file to rename. |
newName | the new name for the file. |
|
virtual |
Removes the directory dirName.
Removes the directory specified by dirName.
dirName | the directory to remove. |
The directory must be empty for rmdir() to succeed.
dirName | the directory to remove. |
|
virtual |
Get the path to the application folder.
Get the path to the application folder (All Users\Application Data).
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. |