//! 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() -> Result { 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 { not_implemented() } async fn get_volume_identifier(&mut self) -> Result { not_implemented() } async fn get_volume_behavior(&mut self) -> Result { not_implemented() } async fn get_path_conf_operations(&mut self) -> Result { not_implemented() } async fn get_volume_capabilities(&mut self) -> Result { not_implemented() } async fn get_volume_statistics(&mut self) -> Result { 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 { not_implemented() } async fn set_attributes( &mut self, _item_id: u64, _attributes: ItemAttributes, ) -> Result { not_implemented() } async fn lookup_item(&mut self, _name: &OsStr, _directory_id: u64) -> Result { 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> { not_implemented() } async fn create_item( &mut self, _name: &OsStr, _kind: ItemType, _directory_id: u64, _attributes: ItemAttributes, ) -> Result { not_implemented() } async fn create_symbolic_link( &mut self, _name: &OsStr, _directory_id: u64, _new_attributes: ItemAttributes, _contents: Vec, ) -> Result { not_implemented() } async fn create_link( &mut self, _item_id: u64, _name: &OsStr, _directory_id: u64, ) -> Result> { 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, ) -> Result> { not_implemented() } async fn enumerate_directory( &mut self, _directory_id: u64, _cookie: u64, _verifier: u64, ) -> Result { not_implemented() } async fn activate(&mut self, _options: TaskOptions) -> Result { not_implemented() } async fn deactivate(&mut self) -> Result<()> { not_implemented() } async fn get_supported_xattr_names(&mut self, _item_id: u64) -> Result { not_implemented() } async fn get_xattr(&mut self, _name: &OsStr, _item_id: u64) -> Result> { not_implemented() } async fn set_xattr( &mut self, _name: &OsStr, _value: Option>, _item_id: u64, _policy: SetXattrPolicy, ) -> Result<()> { not_implemented() } async fn get_xattrs(&mut self, _item_id: u64) -> Result { not_implemented() } async fn open_item(&mut self, _item_id: u64, _modes: Vec) -> Result<()> { not_implemented() } async fn close_item(&mut self, _item_id: u64, _modes: Vec) -> Result<()> { not_implemented() } async fn read(&mut self, _item_id: u64, _offset: i64, _length: i64) -> Result> { not_implemented() } async fn write( &mut self, _contents: Vec, _item_id: u64, _offset: i64, ) -> Result { not_implemented() } async fn check_access(&mut self, _item_id: u64, _access: Vec) -> Result { not_implemented() } async fn set_volume_name(&mut self, _name: Vec) -> Result> { not_implemented() } async fn preallocate_space( &mut self, _item_id: u64, _offset: i64, _length: i64, _flags: Vec, ) -> Result { not_implemented() } async fn deactivate_item(&mut self, _item_id: u64) -> Result<()> { not_implemented() } }