⚠️ VeridianOS Kernel Documentation - This is low-level kernel code. All functions are unsafe unless explicitly marked otherwise. no_std

Module fs

Module fs 

Source
Expand description

Virtual Filesystem (VFS) Layer

Provides a unified interface for different filesystem implementations.

Re-exports§

pub use file::File;
pub use file::FileDescriptor;
pub use file::FileTable;
pub use file::OpenFlags;
pub use file::SeekFrom;

Modules§

blockdev
Block Device Abstraction
blockfs
Block-based persistent filesystem (BlockFS)
devfs
Device Filesystem (/dev)
eventfd
eventfd – Event notification file descriptor
ext4
ext4 Read-Only Filesystem Implementation
fat32
FAT32 Filesystem Implementation
file
File descriptors and file operations
flock
POSIX File Locking (flock/fcntl)
inotify
inotify – File Event Monitoring
nfs
NFS v4 Client Implementation (RFC 7530)
pipe
Kernel pipe objects for inter-process and shell pipeline communication.
procfs
Process Filesystem (/proc)
pty
Pseudo-Terminal (PTY) Support
ramfs
RAM Filesystem Implementation
signalfd
signalfd – Signal notification file descriptor
smb
CIFS/SMB2/3 Client Implementation
tar
TAR archive parser and VFS loader
timerfd
timerfd – Timer notification file descriptor
tmpfs
tmpfs – Memory-Backed Filesystem
xattr
Extended Attributes (xattr) – Per-Inode Metadata Store

Structs§

DirEntry
Directory entry
Metadata
File metadata
MountPoint
Mount point information
Permissions
File permissions (Unix-style)
Vfs
Virtual Filesystem Manager

Enums§

NodeType
Filesystem node types

Constants§

NAME_MAX
Maximum filename length
PATH_MAX
Maximum path length
SYMLINK_MAX_DEPTH
Maximum number of symbolic link traversals before returning ELOOP.

Traits§

Filesystem
Filesystem trait
VfsNode
VFS node operations trait

Functions§

append_file
Append data to a file
copy_file
Copy a file from one location to another
file_exists
Check if a file exists
file_size
Get file size without reading contents
get_vfs
Get the VFS instance (unified for all architectures).
init
Initialize the VFS with a RAM filesystem as root
read_file
Read the entire contents of a file into a Vec
try_get_vfs
Try to get the VFS instance without panicking
write_file
Write data to a file, creating it if it doesn’t exist