Home
last modified time | relevance | path

Searched refs:File (Results 1 – 15 of 15) sorted by relevance

/DragonOS-0.1.8/docs/kernel/filesystem/vfs/
Ddesign.md16 File │ │
41 ## 1. File
42   File结构体是VFS中最基本的抽象,它代表了一个打开的文件。每当进程打开了一个文件,就会创建一个File结构体,用于维护该文件的状态信息。
Dindex.rst11 - 提供文件抽象(File
/DragonOS-0.1.8/docs/kernel/filesystem/
Doverview.md17 - 文件抽象(File
33File
78 - 提供文件抽象(File
/DragonOS-0.1.8/kernel/src/filesystem/vfs/
Dfile.rs88 pub struct File { struct
101 impl File { argument
108 let mut f = File { in new()
295 pub fn try_clone(&self) -> Option<Box<File>> { in try_clone() argument
296 let mut res: Box<File> = Box::new(Self { in try_clone()
366 impl Drop for File { implementation
385 pub fds: [Option<Box<File>>; FileDescriptorVec::PROCESS_MAX_FD],
393 let mut data: [MaybeUninit<Option<Box<File>>>; FileDescriptorVec::PROCESS_MAX_FD] = in new()
401 let data: [Option<Box<File>>; FileDescriptorVec::PROCESS_MAX_FD] = unsafe { in new()
402 core::mem::transmute::<_, [Option<Box<File>>; FileDescriptorVec::PROCESS_MAX_FD]>(data) in new()
Dsyscall.rs16 file::{File, FileMode},
151 parent_inode.create(filename, FileType::File, 0o777)?; in open()
170 && file_type == FileType::File in open()
176 let mut file: File = File::new(inode, mode)?; in open()
208 let file: Option<&mut File> = current_pcb().get_file_mut_by_fd(fd); in read()
212 let file: &mut File = file.unwrap(); in read()
226 let file: Option<&mut File> = current_pcb().get_file_mut_by_fd(fd); in write()
230 let file: &mut File = file.unwrap(); in write()
244 let file: Option<&mut File> = current_pcb().get_file_mut_by_fd(fd); in lseek()
248 let file: &mut File = file.unwrap(); in lseek()
[all …]
Dmod.rs29 File, enumerator
68 FileType::File => DT_REG, in get_file_type_num()
506 file_type: FileType::File, in default()
/DragonOS-0.1.8/kernel/src/process/
Dprocess.rs12 file::{File, FileDescriptorVec, FileMode},
189 pub fn alloc_fd(&mut self, file: File, fd: Option<i32>) -> Result<i32, SystemError> { in alloc_fd() argument
235 pub fn get_file_mut_by_fd(&self, fd: i32) -> Option<&mut File> { in get_file_mut_by_fd() argument
249 pub fn get_file_ref_by_fd(&self, fd: i32) -> Option<&File> { in get_file_ref_by_fd() argument
267 let f: Option<&File> = r.fds[fd as usize].as_deref(); in drop_fd()
360 File::new(tty_inode.clone(), FileMode::O_RDONLY).expect("Init stdio: can't create stdin"); in init_stdio()
362 File::new(tty_inode.clone(), FileMode::O_WRONLY).expect("Init stdio: can't create stdout"); in init_stdio()
363 let stderr = File::new(tty_inode.clone(), FileMode::O_WRONLY | FileMode::O_SYNC) in init_stdio()
Dexec.rs7 file::{File, FileMode},
98 file: Option<File>,
155 pub fn file_mut(&mut self) -> &mut File { in file_mut() argument
165 let file = File::new(inode, FileMode::O_RDONLY)?; in load_binary_file()
/DragonOS-0.1.8/kernel/src/ipc/
Dsyscall.rs8 filesystem::vfs::file::{File, FileMode},
32 let read_file = File::new(pipe_ptr.clone(), FileMode::O_RDONLY)?; in pipe()
33 let write_file = File::new(pipe_ptr.clone(), FileMode::O_WRONLY)?; in pipe()
/DragonOS-0.1.8/docs/userland/libc/apis/api-list/
Derrno.md53 #define EEXIST 20 /* 文件已存在 File exists.*/
57 #define EFBIG 22 /* 文件太大 File too large.*/
81 #define EMFILE 33 /* 文件描述符的值过大 File descriptor value too large.*/
/DragonOS-0.1.8/kernel/src/filesystem/fat/
Dfs.rs111 FATDirEntry::File(f) | FATDirEntry::VolId(f) => { in update_metadata()
169 FileType::File in new()
1364 FATDirEntry::File(f) | FATDirEntry::VolId(f) => { in read_at()
1394 FATDirEntry::File(f) | FATDirEntry::VolId(f) => { in write_at()
1433 FATDirEntry::File(_) | FATDirEntry::VolId(_) => { in create()
1437 FileType::File => { in create()
1473 FATDirEntry::File(file) | FATDirEntry::VolId(file) => { in resize()
1510 FATDirEntry::File(_) | FATDirEntry::VolId(_) => { in list()
1572 FATDirEntry::File(_) | FATDirEntry::VolId(_) => { in unlink()
1599 FATDirEntry::File(_) | FATDirEntry::VolId(_) => { in rmdir()
Dentry.rs42 File(FATFile), enumerator
1221 return FATDirEntry::File(file); in to_dir_entry()
1262 return FATDirEntry::File(file); in to_dir_entry_with_long_name()
1633 FATDirEntry::File(f) | FATDirEntry::VolId(f) => { in short_name()
1651 FATDirEntry::File(f) => { in short_dir_entry()
1667 FATDirEntry::File(f) => { in first_cluster()
1685 FATDirEntry::File(f) => Some(f.loc), in get_dir_range()
1695 FATDirEntry::File(f) => {
1721 FATDirEntry::File(f) => { in name()
1737 &FATDirEntry::File(_) | &FATDirEntry::VolId(_) => true, in is_file()
[all …]
/DragonOS-0.1.8/kernel/src/net/
Dsyscall.rs10 file::{File, FileMode},
59 let f = File::new(socketinode, FileMode::O_RDWR)?; in socket()
343 let new_fd = current_pcb().alloc_fd(File::new(new_socket, FileMode::O_RDWR)?, None)?; in accept()
/DragonOS-0.1.8/kernel/src/filesystem/procfs/
Dmod.rs290 let binding: Arc<dyn IndexNode> = _pf.create("status", FileType::File, 0o777)?; in register_pid()
463 if inode.metadata.file_type == FileType::File { in resize()
/DragonOS-0.1.8/kernel/src/filesystem/ramfs/
Dmod.rs222 if inode.metadata.file_type == FileType::File { in resize()