![]() |
![]() |
![]() |
libinfinity-0.4 Reference Manual | ![]() |
---|---|---|---|---|
Top | Description | Object Hierarchy | Implemented Interfaces | Properties |
enum InfdFilesystemStorageError; InfdFilesystemStorage; InfdFilesystemStorageClass; InfdFilesystemStorage * infd_filesystem_storage_new (const gchar *root_directory
); FILE * infd_filesystem_storage_open (InfdFilesystemStorage *storage
,const gchar *identifier
,const gchar *path
,const gchar *mode
,GError **error
);
typedef enum _InfdFilesystemStorageError { /* The path contains invalid characters */ INFD_FILESYSTEM_STORAGE_ERROR_INVALID_PATH, /* Failed to remove files from disk */ INFD_FILESYSTEM_STORAGE_ERROR_REMOVE_FILES, INFD_FILESYSTEM_STORAGE_ERROR_FAILED } InfdFilesystemStorageError;
typedef struct { GObjectClass parent_class; } InfdFilesystemStorageClass;
InfdFilesystemStorage * infd_filesystem_storage_new (const gchar *root_directory
);
Creates a new InfdFilesystemStorage that stores its nodes in the given directory on the file system. The directory is created if it does not exist.
|
A directory name in UTF-8. |
Returns : |
A new InfdFilesystemStorage. |
FILE * infd_filesystem_storage_open (InfdFilesystemStorage *storage
,const gchar *identifier
,const gchar *path
,const gchar *mode
,GError **error
);
Opens a file in the given path within the storage's root directory. If
the file exists already, and mode
is set to "w", the file is overwritten.
|
A InfdFilesystemStorage. |
|
The type of node to open. |
|
Tha path to open. |
|
Either "r" for reading or "w" for writing. |
|
Location to store error information, if any. |
Returns : |
A stream for the open file. Close with fclose() .
|
"root-directory"
property"root-directory" gchar* : Read / Write / Construct Only
The directory in which the storage stores its content.
Default value: NULL