S2OPC OPCUA Toolkit
|
A platform independent API for file system operations. More...
Go to the source code of this file.
Typedefs | |
typedef struct SOPC_FileSystem_Dir | SOPC_FileSystem_Dir |
Functions | |
SOPC_FileSystem_CreationResult | SOPC_FileSystem_mkdir (const char *directoryPath) |
Request to create a directory with the given path in the file system. Only the last item of the path can be created, the path prefix shall exist. More... | |
SOPC_FileSystem_RemoveResult | SOPC_FileSystem_rmdir (const char *directoryPath) |
Request to delete a directory with the given path in the file system. Only empty directory can be deleted. More... | |
SOPC_FileSystem_GetDirResult | SOPC_FileSystem_GetDirFilePaths (const char *directoryPath, SOPC_Array **ppFilePaths) |
Request to list all the file paths of a directory with the given path in the file system. More... | |
FILE * | SOPC_FileSystem_fmemopen (void *buf, size_t size, const char *opentype) |
Simulates a file open using an memory buffer rather than an actual file. refer to "fmemopen" linux manpage for precise specification. More... | |
A platform independent API for file system operations.
typedef struct SOPC_FileSystem_Dir SOPC_FileSystem_Dir |
SOPC_FileSystem_CreationResult SOPC_FileSystem_mkdir | ( | const char * | directoryPath | ) |
Request to create a directory with the given path in the file system. Only the last item of the path can be created, the path prefix shall exist.
directoryPath | The directory path for which last item (regarding path delimiter) is the directory to create. Path delimiter is still dependent on O.S. but '/' path delimiter should be supported for relative paths. |
SOPC_FileSystem_RemoveResult SOPC_FileSystem_rmdir | ( | const char * | directoryPath | ) |
Request to delete a directory with the given path in the file system. Only empty directory can be deleted.
directoryPath | The directory path in which last item (regarding path delimiter) is the directory to remove. Path delimiter is still dependent on O.S. but '/' path delimiter should be supported for relative paths. |
SOPC_FileSystem_GetDirResult SOPC_FileSystem_GetDirFilePaths | ( | const char * | directoryPath, |
SOPC_Array ** | ppFilePaths | ||
) |
Request to list all the file paths of a directory with the given path in the file system.
directoryPath | The directory path in which last item (regarding path delimiter) is the directory to read. Path delimiter is still dependent on O.S. but '/' path delimiter should be supported for relative paths. |
ppFilePaths | A newly allocated array of file paths (list of NULL terminated C string). You should free it with SOPC_Array_Delete. |
ppFilePaths
is set to NULL.FILE* SOPC_FileSystem_fmemopen | ( | void * | buf, |
size_t | size, | ||
const char * | opentype | ||
) |
Simulates a file open using an memory buffer rather than an actual file. refer to "fmemopen" linux manpage for precise specification.
buf | Non-NULL pointer to the in/out buffer |
size | The size of the buf |
opentype | The file mode: with the same convention as usual "fopen". |