Do not check validity for simplicity Return (readable, writable)
(&self)
| 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 | |
| 85 | pub fn open_file(name: &str, flags: OpenFlags) -> Option<Arc<OSInode>> { |