Lines Matching refs:file
17 vfs::{file::File, mount::MountFS, FileSystem, FileType},
24 use super::{file::FileMode, utils::rsplit_path, IndexNode, InodeId};
232 let mut file: File = File::new(inode, mode)?; in do_open() localVariable
236 file.lseek(SeekFrom::SeekEnd(0))?; in do_open()
240 return current_pcb().alloc_fd(file); in do_open()
251 let file: Option<&mut File> = current_pcb().get_file_mut_by_fd(fd); in do_read() localVariable
252 if file.is_none() { in do_read()
255 let file: &mut File = file.unwrap(); in do_read() localVariable
257 return file.read(buf.len(), buf); in do_read()
268 let file: Option<&mut File> = current_pcb().get_file_mut_by_fd(fd); in do_write() localVariable
269 if file.is_none() { in do_write()
272 let file: &mut File = file.unwrap(); in do_write() localVariable
274 return file.write(buf.len(), buf); in do_write()
285 let file: Option<&mut File> = current_pcb().get_file_mut_by_fd(fd); in do_lseek() localVariable
286 if file.is_none() { in do_lseek()
289 let file: &mut File = file.unwrap(); in do_lseek() localVariable
290 return file.lseek(seek); in do_lseek()