pub struct SingleSymlinkFileSystem { /* private fields */ }Expand description
Tiny read-only filesystem whose root inode is a single symbolic link.
Package projection uses this for managed leaves such as
/opt/agentos/bin/<cmd> and /opt/agentos/pkgs/<pkg>/current. A normal
MemoryFileSystem cannot model that shape because its root inode is always
a directory. Keeping each managed symlink as its own leaf mount lets the
parent directories remain writable overlay directories, so user-installed
commands and packages can coexist beside managed entries.
Implementations§
Trait Implementations§
Source§impl Clone for SingleSymlinkFileSystem
impl Clone for SingleSymlinkFileSystem
Source§fn clone(&self) -> SingleSymlinkFileSystem
fn clone(&self) -> SingleSymlinkFileSystem
Returns a duplicate of the value. Read more
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreSource§impl Debug for SingleSymlinkFileSystem
impl Debug for SingleSymlinkFileSystem
Source§impl VirtualFileSystem for SingleSymlinkFileSystem
impl VirtualFileSystem for SingleSymlinkFileSystem
fn read_file(&mut self, path: &str) -> VfsResult<Vec<u8>>
fn read_dir(&mut self, path: &str) -> VfsResult<Vec<String>>
fn read_dir_with_types(&mut self, path: &str) -> VfsResult<Vec<VirtualDirEntry>>
Source§fn write_file(
&mut self,
path: &str,
_content: impl Into<Vec<u8>>,
) -> VfsResult<()>
fn write_file( &mut self, path: &str, _content: impl Into<Vec<u8>>, ) -> VfsResult<()>
Writes caller-owned bytes into the filesystem. Read more
fn create_dir(&mut self, path: &str) -> VfsResult<()>
fn mkdir(&mut self, path: &str, _recursive: bool) -> VfsResult<()>
fn exists(&self, path: &str) -> bool
fn stat(&mut self, path: &str) -> VfsResult<VirtualStat>
fn remove_file(&mut self, path: &str) -> VfsResult<()>
fn remove_dir(&mut self, path: &str) -> VfsResult<()>
fn rename(&mut self, old_path: &str, new_path: &str) -> VfsResult<()>
fn realpath(&self, path: &str) -> VfsResult<String>
fn symlink(&mut self, target: &str, link_path: &str) -> VfsResult<()>
fn read_link(&self, path: &str) -> VfsResult<String>
fn lstat(&self, path: &str) -> VfsResult<VirtualStat>
fn link(&mut self, old_path: &str, new_path: &str) -> VfsResult<()>
fn chmod(&mut self, path: &str, _mode: u32) -> VfsResult<()>
fn chown(&mut self, path: &str, _uid: u32, _gid: u32) -> VfsResult<()>
fn utimes( &mut self, path: &str, _atime_ms: u64, _mtime_ms: u64, ) -> VfsResult<()>
fn utimes_spec( &mut self, path: &str, _atime: VirtualUtimeSpec, _mtime: VirtualUtimeSpec, _follow_symlinks: bool, ) -> VfsResult<()>
Source§fn truncate(&mut self, path: &str, _length: u64) -> VfsResult<()>
fn truncate(&mut self, path: &str, _length: u64) -> VfsResult<()>
Resizes a file. VM resource policy must be enforced by the caller.
fn pread( &mut self, path: &str, _offset: u64, _length: usize, ) -> VfsResult<Vec<u8>>
fn read_text_file(&mut self, path: &str) -> VfsResult<String>
fn read_dir_limited( &mut self, path: &str, max_entries: usize, ) -> VfsResult<Vec<String>>
fn write_file_with_mode( &mut self, path: &str, content: impl Into<Vec<u8>>, mode: Option<u32>, ) -> VfsResult<()>
fn create_file_exclusive( &mut self, path: &str, content: impl Into<Vec<u8>>, ) -> VfsResult<()>
fn create_file_exclusive_with_mode( &mut self, path: &str, content: impl Into<Vec<u8>>, mode: Option<u32>, ) -> VfsResult<()>
Source§fn append_file(
&mut self,
path: &str,
content: impl Into<Vec<u8>>,
) -> VfsResult<u64>
fn append_file( &mut self, path: &str, content: impl Into<Vec<u8>>, ) -> VfsResult<u64>
Appends caller-owned bytes into the filesystem after checking that the
in-memory file can grow without overflowing addressable memory.
fn create_dir_with_mode( &mut self, path: &str, mode: Option<u32>, ) -> VfsResult<()>
fn mkdir_with_mode( &mut self, path: &str, recursive: bool, mode: Option<u32>, ) -> VfsResult<()>
Auto Trait Implementations§
impl Freeze for SingleSymlinkFileSystem
impl RefUnwindSafe for SingleSymlinkFileSystem
impl Send for SingleSymlinkFileSystem
impl Sync for SingleSymlinkFileSystem
impl Unpin for SingleSymlinkFileSystem
impl UnsafeUnpin for SingleSymlinkFileSystem
impl UnwindSafe for SingleSymlinkFileSystem
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more