pub struct DevDirectoryObject {
node: Arc<DevNode>,
position: RwLock<usize>,
}
Expand description
A file object for directories in DevFS
This struct provides a FileObject implementation for directories that allows reading directory entries as binary DirectoryEntry data.
Fields§
§node: Arc<DevNode>
Reference to the DevNode
position: RwLock<usize>
Current position in directory entries (entry index)
Implementations§
Trait Implementations§
Source§impl FileObject for DevDirectoryObject
impl FileObject for DevDirectoryObject
Source§fn seek(&self, whence: SeekFrom) -> Result<u64, StreamError>
fn seek(&self, whence: SeekFrom) -> Result<u64, StreamError>
Seek to a position in the file stream
Source§fn metadata(&self) -> Result<FileMetadata, StreamError>
fn metadata(&self) -> Result<FileMetadata, StreamError>
Get metadata about the file
Source§fn truncate(&self, _size: u64) -> Result<(), StreamError>
fn truncate(&self, _size: u64) -> Result<(), StreamError>
Truncate the file to the specified size Read more
Source§impl StreamOps for DevDirectoryObject
impl StreamOps for DevDirectoryObject
Source§fn read(&self, buffer: &mut [u8]) -> Result<usize, StreamError>
fn read(&self, buffer: &mut [u8]) -> Result<usize, StreamError>
Read data from the stream
Source§fn write(&self, _buffer: &[u8]) -> Result<usize, StreamError>
fn write(&self, _buffer: &[u8]) -> Result<usize, StreamError>
Write data to the stream