Something went wrong. Try again.
A user-space CRDT filesystem
Something went wrong. Try again.
123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220//! FSKit backend: [`StubFilesystem`] implements [`fskit_rs::Filesystem`] with `ENOSYS` stubs.
pub mod backend;pub mod host_store;pub mod transducer;pub mod wire;
use std::ffi::OsStr;
use async_trait::async_trait;use fskit_rs::{ AccessMask, DirectoryEntries, Error, Filesystem, Item, ItemAttributes, ItemType, OpenMode, PathConfOperations, PreallocateFlag, ResourceIdentifier, Result, SetXattrPolicy, StatFsResult, SupportedCapabilities, SyncFlags, TaskOptions, VolumeBehavior, VolumeIdentifier, Xattrs,};
#[inline]fn not_implemented<T>() -> Result<T> { Err(Error::Posix(libc::ENOSYS))}
/// Placeholder file system: every operation returns `ENOSYS` until implemented.#[derive(Clone, Debug, Default)]pub struct StubFilesystem;
#[async_trait]impl Filesystem for StubFilesystem { async fn get_resource_identifier(&mut self) -> Result<ResourceIdentifier> { not_implemented() }
async fn get_volume_identifier(&mut self) -> Result<VolumeIdentifier> { not_implemented() }
async fn get_volume_behavior(&mut self) -> Result<VolumeBehavior> { not_implemented() }
async fn get_path_conf_operations(&mut self) -> Result<PathConfOperations> { not_implemented() }
async fn get_volume_capabilities(&mut self) -> Result<SupportedCapabilities> { not_implemented() }
async fn get_volume_statistics(&mut self) -> Result<StatFsResult> { not_implemented() }
async fn mount(&mut self, _options: TaskOptions) -> Result<()> { not_implemented() }
async fn unmount(&mut self) -> Result<()> { not_implemented() }
async fn synchronize(&mut self, _flags: SyncFlags) -> Result<()> { not_implemented() }
async fn get_attributes(&mut self, _item_id: u64) -> Result<ItemAttributes> { not_implemented() }
async fn set_attributes( &mut self, _item_id: u64, _attributes: ItemAttributes, ) -> Result<ItemAttributes> { not_implemented() }
async fn lookup_item(&mut self, _name: &OsStr, _directory_id: u64) -> Result<Item> { not_implemented() }
async fn reclaim_item(&mut self, _item_id: u64) -> Result<()> { not_implemented() }
async fn read_symbolic_link(&mut self, _item_id: u64) -> Result<Vec<u8>> { not_implemented() }
async fn create_item( &mut self, _name: &OsStr, _kind: ItemType, _directory_id: u64, _attributes: ItemAttributes, ) -> Result<Item> { not_implemented() }
async fn create_symbolic_link( &mut self, _name: &OsStr, _directory_id: u64, _new_attributes: ItemAttributes, _contents: Vec<u8>, ) -> Result<Item> { not_implemented() }
async fn create_link( &mut self, _item_id: u64, _name: &OsStr, _directory_id: u64, ) -> Result<Vec<u8>> { not_implemented() }
async fn remove_item( &mut self, _item_id: u64, _name: &OsStr, _directory_id: u64, ) -> Result<()> { not_implemented() }
async fn rename_item( &mut self, _item_id: u64, _source_directory_id: u64, _source_name: &OsStr, _destination_name: &OsStr, _destination_directory_id: u64, _over_item_id: Option<u64>, ) -> Result<Vec<u8>> { not_implemented() }
async fn enumerate_directory( &mut self, _directory_id: u64, _cookie: u64, _verifier: u64, ) -> Result<DirectoryEntries> { not_implemented() }
async fn activate(&mut self, _options: TaskOptions) -> Result<Item> { not_implemented() }
async fn deactivate(&mut self) -> Result<()> { not_implemented() }
async fn get_supported_xattr_names(&mut self, _item_id: u64) -> Result<Xattrs> { not_implemented() }
async fn get_xattr(&mut self, _name: &OsStr, _item_id: u64) -> Result<Vec<u8>> { not_implemented() }
async fn set_xattr( &mut self, _name: &OsStr, _value: Option<Vec<u8>>, _item_id: u64, _policy: SetXattrPolicy, ) -> Result<()> { not_implemented() }
async fn get_xattrs(&mut self, _item_id: u64) -> Result<Xattrs> { not_implemented() }
async fn open_item(&mut self, _item_id: u64, _modes: Vec<OpenMode>) -> Result<()> { not_implemented() }
async fn close_item(&mut self, _item_id: u64, _modes: Vec<OpenMode>) -> Result<()> { not_implemented() }
async fn read(&mut self, _item_id: u64, _offset: i64, _length: i64) -> Result<Vec<u8>> { not_implemented() }
async fn write( &mut self, _contents: Vec<u8>, _item_id: u64, _offset: i64, ) -> Result<i64> { not_implemented() }
async fn check_access(&mut self, _item_id: u64, _access: Vec<AccessMask>) -> Result<bool> { not_implemented() }
async fn set_volume_name(&mut self, _name: Vec<u8>) -> Result<Vec<u8>> { not_implemented() }
async fn preallocate_space( &mut self, _item_id: u64, _offset: i64, _length: i64, _flags: Vec<PreallocateFlag>, ) -> Result<i64> { not_implemented() }
async fn deactivate_item(&mut self, _item_id: u64) -> Result<()> { not_implemented() }}