Lines Matching refs:FileMode
16 file::{File, FileMode},
129 pub fn open(path: &str, mode: FileMode) -> Result<usize, SystemError> { in open()
141 if mode.contains(FileMode::O_CREAT) in open()
142 && !mode.contains(FileMode::O_DIRECTORY) in open()
163 if mode.contains(FileMode::O_DIRECTORY) && file_type != FileType::Dir { in open()
168 if mode.contains(FileMode::O_TRUNC) in open()
169 && (mode.contains(FileMode::O_RDWR) || mode.contains(FileMode::O_WRONLY)) in open()
179 if mode.contains(FileMode::O_APPEND) { in open()
334 return do_mkdir(path, FileMode::from_bits_truncate(mode as u32)).map(|x| x as usize); in mkdir()
365 match do_unlink_at(&pathname, FileMode::from_bits_truncate(flags as u32)) { in unlinkat()
527 let mode = FileMode::from_bits(arg).ok_or(SystemError::EINVAL)?; in fcntl()