2 releases

0.1.1 Jul 18, 2024
0.1.0 Jul 18, 2024

#374 in Operating systems

Download history 194/week @ 2024-08-15 191/week @ 2024-08-22 281/week @ 2024-08-29 533/week @ 2024-09-05 235/week @ 2024-09-12 293/week @ 2024-09-19 262/week @ 2024-09-26 219/week @ 2024-10-03 860/week @ 2024-10-10 1200/week @ 2024-10-17 502/week @ 2024-10-24 98/week @ 2024-10-31 261/week @ 2024-11-07 404/week @ 2024-11-14 354/week @ 2024-11-21 231/week @ 2024-11-28

1,256 downloads per month
Used in 2 crates

GPL-3.0-or-later OR Apache-2…

22KB
404 lines

axfs_crates

CI

Crates for building filesystems:


lib.rs:

Virtual filesystem interfaces used by ArceOS.

A filesystem is a set of files and directories (symbol links are not supported currently), collectively referred to as nodes, which are conceptually similar to inodes in Linux. A file system needs to implement the VfsOps trait, its files and directories need to implement the VfsNodeOps trait.

The VfsOps trait provides the following operations on a filesystem:

  • mount(): Do something when the filesystem is mounted.
  • umount(): Do something when the filesystem is unmounted.
  • format(): Format the filesystem.
  • statfs(): Get the attributes of the filesystem.
  • root_dir(): Get root directory of the filesystem.

The VfsNodeOps trait provides the following operations on a file or a directory:

Operation Description file/directory
open() Do something when the node is opened both
release() Do something when the node is closed both
get_attr() Get the attributes of the node both
read_at() Read data from the file file
write_at() Write data to the file file
fsync() Synchronize the file data to disk file
truncate() Truncate the file file
parent() Get the parent directory directory
lookup() Lookup the node with the given path directory
create() Create a new node with the given path directory
remove() Remove the node with the given path directory
read_dir() Read directory entries directory

Dependencies

~205KB