Acess VFS Layer.
The Acess Virtual File System (VFS) provides abstraction of multiple physical filesystems, network storage and devices (both hardware and virtual) to the user.
The core of the VFS is the concept of a VFS Node. A VFS Node represents a "file" in the VFS tree, this can be any sort of file (an ordinary file, a directory, a symbolic link or a device) depending on the bits set in the tVFS_Node::Flags Flags field.
Go to the source code of this file.
Data Structures | |
struct | tVFS_Node |
Represents a node (file or directory) in the VFS tree. More... | |
struct | tVFS_Driver |
VFS Driver (Filesystem) Definition. More... | |
Defines | |
#define | VFS_MAXSKIP ((void*)1024) |
Maximum number of elements that can be skipped in one return. | |
#define | VFS_SKIP ((void*)1) |
Skip a single entry in readdir. | |
#define | VFS_SKIPN(n) ((void*)(n)) |
Skip n entries in readdir. | |
tVFS_Node Flags | |
Flag values for tVFS_Node.Flags | |
#define | VFS_FFLAG_READONLY 0x01 |
#define | VFS_FFLAG_DIRECTORY 0x02 |
Directory Flag. | |
#define | VFS_FFLAG_SYMLINK 0x04 |
Symbolic Link Flag. | |
#define | VFS_FFLAG_SETUID 0x08 |
Set User ID Flag. | |
#define | VFS_FFLAG_SETGID 0x10 |
Set Group ID Flag. | |
Functions | |
int | VFS_AddDriver (tVFS_Driver *Info) |
Registers the driver with the DevFS layer. | |
tVFS_Driver * | VFS_GetFSByName (const char *Name) |
tVFS_ACL * | VFS_UnixToAcessACL (Uint Mode, Uint Owner, Uint Group) |
Transforms Unix Permssions into Acess ACLs. | |
Node Cache | |
int | Inode_GetHandle (void) |
Gets a unique handle to the Node Cache. | |
tVFS_Node * | Inode_GetCache (int Handle, Uint64 Inode) |
Gets an inode from the node cache. | |
tVFS_Node * | Inode_CacheNode (int Handle, tVFS_Node *Node) |
Caches a node in the Node Cache. | |
void | Inode_UncacheNode (int Handle, Uint64 Inode) |
Dereferences (and removes if needed) a node from the cache. | |
void | Inode_ClearCache (int Handle) |
Clears the cache for a handle. | |
Variables | |
tVFS_Node | NULLNode |
NULL VFS Node (Ignored/Skipped). | |
Static ACLs | |
tVFS_ACL | gVFS_ACL_EveryoneRWX |
Everyone Read/Write/Execute. | |
tVFS_ACL | gVFS_ACL_EveryoneRW |
Everyone Read/Write. | |
tVFS_ACL | gVFS_ACL_EveryoneRX |
Everyone Read/Execute. | |
tVFS_ACL | gVFS_ACL_EveryoneRO |
Everyone Read only. |
#define VFS_FFLAG_DIRECTORY 0x02 |
Directory Flag.
This flag marks the tVFS_Node as describing a directory, and says that the tVFS_Node.FindDir, tVFS_Node.ReadDir, tVFS_Node.MkNod and tVFS_Node.Relink function pointers are valid. For a directory the tVFS_Node.Size field contains the number of files within the directory, or -1 for undetermined.
#define VFS_FFLAG_READONLY 0x01 |
Readonly File
#define VFS_FFLAG_SETGID 0x10 |
Set Group ID Flag.
Allows an executable file to change it's executing group to the file's owning group. In the case of a directory, it means that all immediate children will inherit the GID of the parent.
#define VFS_FFLAG_SETUID 0x08 |
Set User ID Flag.
Allows an executable file to change it's executing user to the file's owner. In the case of a directory, it means that all immediate children will inherit the UID of the parent.
#define VFS_FFLAG_SYMLINK 0x04 |
Symbolic Link Flag.
Marks a file as a symbolic link
Caches a node in the Node Cache.
Handle | A handle returned by Inode_GetHandle() | |
Node | A pointer to the node to be cached (a copy is taken) |
void Inode_ClearCache | ( | int | Handle | ) |
Clears the cache for a handle.
Handle | A handle returned by Inode_GetHandle() |
Gets an inode from the node cache.
Handle | A handle returned by Inode_GetHandle() | |
Inode | Value of the Inode field of the tVFS_Node you want |
int Inode_GetHandle | ( | void | ) |
Gets a unique handle to the Node Cache.
int Inode_UncacheNode | ( | int | Handle, | |
Uint64 | Inode | |||
) |
Dereferences (and removes if needed) a node from the cache.
Handle | A handle returned by Inode_GetHandle() | |
Inode | Value of the Inode field of the tVFS_Node you want to remove |
int VFS_AddDriver | ( | tVFS_Driver * | Info | ) |
Registers the driver with the DevFS layer.
Info | Driver information structure |