Represents a node (file or directory) in the VFS tree. More...
#include <vfs.h>
Data Fields | |
Identifiers | |
| Uint64 | Inode |
| Inode ID (Essentially another ImplInt). | |
| Uint | ImplInt |
| Implementation Usable Integer. | |
| void * | ImplPtr |
| Implementation Usable Pointer. | |
Node State | |
| int | ReferenceCount |
| Number of times the node is used. | |
| Uint64 | Size |
| File Size. | |
| Uint32 | Flags |
| File Flags. | |
| void * | Data |
| Pointer to cached data (FS Specific). | |
| tMutex | Lock |
| Node mutex. | |
Times | |
| Sint64 | ATime |
| Last Accessed Time. | |
| Sint64 | MTime |
| Last Modified Time. | |
| Sint64 | CTime |
| Creation Time. | |
Access controll | |
| tUID | UID |
| ID of Owning User. | |
| tGID | GID |
| ID of Owning Group. | |
| int | NumACLs |
| Number of ACL entries. | |
| tVFS_ACL * | ACLs |
| Access Controll List pointer. | |
Common Functions | |
| void(* | Reference )(struct sVFS_Node *Node) |
| Reference the node. | |
| void(* | Close )(struct sVFS_Node *Node) |
| Close (dereference) the node. | |
| int(* | IOCtl )(struct sVFS_Node *Node, int Id, void *Data) |
| Send an IO Control. | |
Buffer Functions | |
| Uint64(* | Read )(struct sVFS_Node *Node, Uint64 Offset, Uint64 Length, void *Buffer) |
| Read from the file. | |
| Uint64(* | Write )(struct sVFS_Node *Node, Uint64 Offset, Uint64 Length, void *Buffer) |
| Write to the file. | |
Directory Functions | |
| struct sVFS_Node *(* | FindDir )(struct sVFS_Node *Node, const char *Name) |
| Find an directory entry by name. | |
| char *(* | ReadDir )(struct sVFS_Node *Node, int Pos) |
| Read from a directory. | |
| int(* | MkNod )(struct sVFS_Node *Node, const char *Name, Uint Flags) |
| Create a node in a directory. | |
| int(* | Relink )(struct sVFS_Node *Node, const char *OldName, const char *NewName) |
| Relink (Rename/Remove) a file/directory. | |
| int(* | Link )(struct sVFS_Node *Node, struct sVFS_Node *Child, const char *NewName) |
| Link a node to a name. | |
Represents a node (file or directory) in the VFS tree.
This structure provides the VFS with the functions required to read/write the file (or directory) that it represents.
| void(* tVFS_Node::Close)(struct sVFS_Node *Node) |
Close (dereference) the node.
| Node | Pointer to this node |
Usually .Close is used to write any changes to the node back to the persistent storage.
| void* tVFS_Node::Data |
Pointer to cached data (FS Specific).
struct sVFS_Node*(* tVFS_Node::FindDir)(struct sVFS_Node *Node, const char *Name) [read] |
Find an directory entry by name.
| Node | Pointer to this node | |
| Name | Name of the file wanted |
| int(* tVFS_Node::IOCtl)(struct sVFS_Node *Node, int Id, void *Data) |
Send an IO Control.
| Node | Pointer to this node | |
| Id | IOCtl call number | |
| Data | Pointer to data to pass to the driver |
| int(* tVFS_Node::Link)(struct sVFS_Node *Node, struct sVFS_Node *Child, const char *NewName) |
Link a node to a name.
| Node | Pointer to this node (directory) | |
| Child | Node to create a new link to | |
| NewName | Name for the new link |
| tMutex tVFS_Node::Lock |
Node mutex.
| int(* tVFS_Node::MkNod)(struct sVFS_Node *Node, const char *Name, Uint Flags) |
Create a node in a directory.
| Node | Pointer to this node | |
| Name | Name of the new child | |
| Flags | Flags to apply to the new child (directory or symlink) |
| Uint64(* tVFS_Node::Read)(struct sVFS_Node *Node, Uint64 Offset, Uint64 Length, void *Buffer) |
Read from the file.
| Node | Pointer to this node | |
| Offset | Byte offset in the file | |
| Length | Number of bytes to read | |
| Buffer | Destination for read data |
| char*(* tVFS_Node::ReadDir)(struct sVFS_Node *Node, int Pos) |
Read from a directory.
| Node | Pointer to this node | |
| Pos | Offset in the directory |
| void(* tVFS_Node::Reference)(struct sVFS_Node *Node) |
Reference the node.
| Node | Pointer to this node |
| int(* tVFS_Node::Relink)(struct sVFS_Node *Node, const char *OldName, const char *NewName) |
Relink (Rename/Remove) a file/directory.
| Node | Pointer to this node | |
| OldName | Name of the item to move/delete | |
| NewName | New name (or NULL if unlinking is wanted) |
| Uint64(* tVFS_Node::Write)(struct sVFS_Node *Node, Uint64 Offset, Uint64 Length, void *Buffer) |
Write to the file.
| Node | Pointer to this node | |
| Offset | Byte offser in the file | |
| Length | Number of bytes to write | |
| Buffer | Source of written data |
1.6.3