libole2 Library Reference Manual | |||
---|---|---|---|
<<< Previous Page | Home | Up | Next Page >>> |
#include <libole2/libole2.h> struct MsOle; #define ms_ole_open (fs,path) MsOleErr ms_ole_open_vfs (MsOle **fs, const char *path, |
MsOle is a filesystem object and handles an open filesystem.
ms_ole_open() opens a filesystem. ms_ole_create() creates a new filesystem. ms_ole_destroy() closes a filesystem (therefore destroying the filesystem object). ms_ole_open_vfs() and ms_ole_create_vfs() allow more control on the way the filesystem-in-a-file is actualy accessed.
ms_ole_unlink() deletes a stream or a directory on a filesystem. ms_ole_stat() gets information about a stream or a directory. ms_ole_directory() returns the names of the streams and directories in a directory.
#define ms_ole_open(fs,path) ms_ole_open_vfs ((fs), (path), TRUE, NULL) |
Opens the filesystem-in-a-file path and creates the filesystem object fs. Returns a MsOleErr code.
This is a convenience macro for ms_ole_open_vfs().
fs : | filesystem object. |
path : | path to the filesystem-in-a-file on the actual filesystem. |
MsOleErr ms_ole_open_vfs (MsOle **fs, const char *path, |
Opens the filesystem-in-the-file path and creates the filesystem object fs.
fs : | filesystem object. |
path : | path to the filesystem-in-the file on the actual filesystem. |
try_mmap : | TRUE if try to mmap(2) the filesystem-in-a-file, instead of opening. |
wrappers : | system functions wrappers, NULL if standard functions are used. |
Returns : | a MsOleErr code. |
#define ms_ole_create(fs,path) ms_ole_create_vfs ((fs), (path), TRUE, NULL) |
Creates the filesystem-in-a-file path and creates the filesystem object fs. Returns a MsOleErr code.
This is a convenience macro for ms_ole_create_vfs().
fs : | filesystem object. |
path : | path to the filesystem-in-a-file on the actual filesystem. |
MsOleErr ms_ole_create_vfs (MsOle **fs, const char *path, int try_mmap, MsOleSysWrappers *wrappers); |
Creates the filesystem-in-the-file path and creates the filesystem fs.
fs : | filesystem object. |
path : | path to the filesystem-in-the file on the actual filesystem. |
try_mmap : | TRUE if try to mmap(2) the filesystem-in-a-file, instead of opening. |
wrappers : | system functions wrappers, NULL if standard functions are used. |
Returns : | a MsOleErr code. |
void ms_ole_ref (MsOle *fs); |
Increment by one the count of references to the filesystem.
fs : | filesystem object. |
void ms_ole_unref (MsOle *fs); |
Decrement by one the count of references to the filesystem.
fs : | filesystem object. |
void ms_ole_destroy (MsOle **fs); |
Closes the filesystem fs and truncates any free blocks.
fs : | filesystem object. |
MsOleErr ms_ole_unlink (MsOle *fs, const char *path); |
Delete the stream or directory path on the filesystem fs.
fs : | filesystem object. |
path : | path of the stream or directory to delete. |
Returns : | a MsOleErr code. |
MsOleErr ms_ole_stat (MsOleStat *stat, MsOle *fs, const char *dirpath, const char *name); |
Gets information about the stream or the directory which is in the directory dirpath and its name is file.
stat : | stat information. |
fs : | filesystem object. |
dirpath : | directory path. |
name : | stream or directory name. |
Returns : | a MsOleErr code. |
MsOleErr ms_ole_directory (char ***names, MsOle *fs, const char *dirpath); |
Gets the names of the streams and directories in the directory dirpath.
names : | array where the names are storesd, it's NULL ended. |
fs : | filesystem object. |
dirpath : | directory path. |
Returns : | a MsOleErr code. |