MCPcopy Create free account
hub / github.com/chyyuu/os_kernel_lab / read_write

Method read_write

os/src/fs/inode.rs:74–82  ·  view source on GitHub ↗

Do not check validity for simplicity Return (readable, writable)

(&self)

Source from the content-addressed store, hash-verified

72 /// Do not check validity for simplicity
73 /// Return (readable, writable)
74 pub fn read_write(&self) -> (bool, bool) {
75 if self.is_empty() {
76 (true, false)
77 } else if self.contains(Self::WRONLY) {
78 (false, true)
79 } else {
80 (true, true)
81 }
82 }
83}
84
85pub fn open_file(name: &str, flags: OpenFlags) -> Option<Arc<OSInode>> {

Callers 1

open_fileFunction · 0.80

Calls 2

is_emptyMethod · 0.80
containsMethod · 0.80

Tested by

no test coverage detected