#include <libisofs.h>
That is defined as a set of files that are organized in a hierarchical structure.
A filesystem allows libisofs to access files from several sources in an homogeneous way, thus abstracting the underlying operations needed to access and read file contents. Note that this doesn't need to be tied to the disc filesystem used in the partition being accessed. For example, we have an IsoFilesystem implementation to access any mounted filesystem, using standard Linux functions. It is also legal, of course, to implement an IsoFilesystem to deal with a specific filesystem over raw partitions. That is what we do, for example, to access an ISO Image.
Each file inside an IsoFilesystem is represented as an IsoFileSource object, that defines POSIX-like interface for accessing files.
Definition at line 356 of file libisofs.h.
Data Fields | |
char | type [4] |
Type of filesystem. | |
int | version |
int(* | get_root )(IsoFilesystem *fs, IsoFileSource **root) |
Get the root of a filesystem. | |
int(* | get_by_path )(IsoFilesystem *fs, const char *path, IsoFileSource **file) |
Retrieve a file from its absolute path inside the filesystem. | |
unsigned int(* | get_id )(IsoFilesystem *fs) |
Get filesystem identifier. | |
int(* | open )(IsoFilesystem *fs) |
Opens the filesystem for several read operations. | |
int(* | close )(IsoFilesystem *fs) |
Close the filesystem, thus freeing all system resources. | |
void(* | free )(IsoFilesystem *fs) |
Free implementation specific data. | |
unsigned int | refcount |
void * | data |
char iso_filesystem::type[4] |
Type of filesystem.
"file" -> local filesystem "iso " -> iso image filesystem
Definition at line 363 of file libisofs.h.
Definition at line 366 of file libisofs.h.
int(* iso_filesystem::get_root)(IsoFilesystem *fs, IsoFileSource **root) |
Get the root of a filesystem.
int(* iso_filesystem::get_by_path)(IsoFilesystem *fs, const char *path, IsoFileSource **file) |
Retrieve a file from its absolute path inside the filesystem.
unsigned int(* iso_filesystem::get_id)(IsoFilesystem *fs) |
Get filesystem identifier.
If the filesystem is able to generate correct values of the st_dev and st_ino fields for the struct stat of each file, this should return an unique number, greater than 0.
To get a identifier for your filesystem implementation you should use iso_fs_global_id, incrementing it by one each time.
Otherwise, if you can't ensure values in the struct stat are valid, this should return 0.
int(* iso_filesystem::open)(IsoFilesystem *fs) |
Opens the filesystem for several read operations.
Calling this funcion is not needed at all, each time that the underlying system resource needs to be accessed, it is openned propertly. However, if you plan to execute several operations on the filesystem, it is a good idea to open it previously, to prevent several open/close operations to occur.
int(* iso_filesystem::close)(IsoFilesystem *fs) |
void(* iso_filesystem::free)(IsoFilesystem *fs) |
Free implementation specific data.
Should never be called by user. Use iso_filesystem_unref() instead.
unsigned int iso_filesystem::refcount |
Definition at line 435 of file libisofs.h.
void* iso_filesystem::data |
Definition at line 436 of file libisofs.h.