pub struct OSInode {
readable: bool,
writable: bool,
inner: Arc<DirectoryTreeNode>,
offset: Mutex<usize>,
}
Fields
readable: bool
writable: bool
inner: Arc<DirectoryTreeNode>
offset: Mutex<usize>
Implementations
pub fn open_by_relative_path(
&self,
path: &str,
flags: OpenFlags,
type_: DiskInodeType
) -> Result<Arc<OSInode>, isize>
Trait Implementations
If offset is not None
, kread()
will start reading file from *offset
,
the *offset
is adjusted to reflect the number of bytes written to the buffer,
and the file offset won’t be modified.
Otherwise kread()
will start reading file from file offset,
the file offset is adjusted to reflect the number of bytes written to the buffer.
Warning
Buffer must be in kernel space
If offset is not None
, kwrite()
will start writing file from *offset
,
the *offset
is adjusted to reflect the number of bytes read from the buffer,
and the file offset won’t be modified.
Otherwise kwrite()
will start writing file from file offset,
the file offset is adjusted to reflect the number of bytes read from the buffer.
Warning
Buffer must be in kernel space
Whether the file is inherently readable. Usually used as an indicator for authority for regular files. Read more
Whether the file is inherently writable. Usually used as an indicator for authority for regular files. Read more
Control the device file. manipulates the underlying device parameters of special files. In particular, many operating characteristics of character special files (e.g., terminals) may be controlled with ioctl() requests. See the specific file type and its implementation for hint about available commands and arguments. Read more