Home
last modified time | relevance | path

Searched refs:FileType (Results 1 – 13 of 13) sorted by relevance

/DragonOS-0.1.5/kernel/src/filesystem/vfs/
Dmod.rs28 pub enum FileType { enum
64 impl FileType { implementation
67 FileType::File => DT_REG, in get_file_type_num()
68 FileType::Dir => DT_DIR, in get_file_type_num()
69 FileType::BlockDevice => DT_BLK, in get_file_type_num()
70 FileType::CharDevice => DT_CHR, in get_file_type_num()
71 FileType::Pipe => DT_FIFO, in get_file_type_num()
72 FileType::SymLink => DT_LNK, in get_file_type_num()
185 file_type: FileType, in create() argument
204 _file_type: FileType, in create_with_data() argument
[all …]
Dcore.rs17 vfs::{file::File, mount::MountFS, FileSystem, FileType},
60 .create("proc", FileType::Dir, 0o777) in vfs_init()
63 .create("dev", FileType::Dir, 0o777) in vfs_init()
106 .create(mountpoint_name, FileType::Dir, 0o777) in do_migrate()
207 let inode: Arc<dyn IndexNode> = parent_inode.create(filename, FileType::File, 0o777)?; in do_open()
217 let file_type: FileType = inode.metadata()?.file_type; in do_open()
219 if mode.contains(FileMode::O_DIRECTORY) && file_type != FileType::Dir { in do_open()
226 && file_type == FileType::File in do_open()
312 parent_inode.create(filename, FileType::Dir, 0o777)?; in do_mkdir()
343 if parent_inode.metadata()?.file_type != FileType::Dir { in do_remove_dir()
[all …]
Dfile.rs15 use super::{Dirent, FileType, IndexNode, Metadata};
88 file_type: FileType,
100 let file_type: FileType = inode.metadata()?.file_type; in new()
170 if self.inode.metadata().unwrap().file_type == FileType::Pipe { in lseek()
Dmount.rs13 use super::{FilePrivateData, FileSystem, FileType, IndexNode, InodeId};
140 file_type: FileType, in create_with_data() argument
209 file_type: FileType, in create() argument
330 if metadata.file_type != FileType::Dir { in mount()
Dsyscall.rs18 Dirent, FileType, ROOT_INODE,
211 if let FileType::Dir = i.file_type { in sys_chdir()
/DragonOS-0.1.5/kernel/src/filesystem/ramfs/
Dmod.rs11 filesystem::vfs::{core::generate_inode_id, FileType},
94 file_type: FileType::Dir, in new()
133 if inode.metadata.file_type == FileType::Dir { in read_at()
166 if inode.metadata.file_type == FileType::Dir { in write_at()
187 if inode.metadata.file_type == FileType::Dir { in poll()
226 if inode.metadata.file_type == FileType::File { in resize()
237 file_type: FileType, in create_with_data() argument
244 if inode.metadata.file_type != FileType::Dir { in create_with_data()
294 if inode.metadata.file_type != FileType::Dir { in link()
299 if other_locked.metadata.file_type == FileType::Dir { in link()
[all …]
/DragonOS-0.1.5/kernel/src/filesystem/devfs/
Dmod.rs7 FileSystem, FileType, FsInfo, IndexNode, Metadata, PollStatus,
54 DevFSInode::new(FileType::Dir, 0o755 as u32, 0), in new()
101 FileType::CharDevice => { in register_device()
103 dev_root_inode.create("char", FileType::Dir, 0o755)?; in register_device()
115 FileType::BlockDevice => { in register_device()
117 dev_root_inode.create("block", FileType::Dir, 0o755)?; in register_device()
142 FileType::CharDevice => { in unregister_device()
155 FileType::BlockDevice => { in unregister_device()
197 pub fn new(dev_type_: FileType, mode_: u32, data_: usize) -> Self { in new() argument
203 dev_type_: FileType, in new_with_parent() argument
[all …]
Dnull_dev.rs3 core::generate_inode_id, FilePrivateData, FileSystem, FileType, IndexNode, Metadata, PollStatus,
48 file_type: FileType::CharDevice, // 文件夹,block设备,char设备 in new()
Dzero_dev.rs3 core::generate_inode_id, FilePrivateData, FileSystem, FileType, IndexNode, Metadata, PollStatus,
48 file_type: FileType::CharDevice, // 文件夹,block设备,char设备 in new()
/DragonOS-0.1.5/kernel/src/filesystem/procfs/
Dmod.rs15 FileType,
252 file_type: FileType::Dir, in new()
285 let _pf: Arc<dyn IndexNode> = proc.create(&pid.to_string(), FileType::Dir, 0o777)?; in register_pid()
288 let binding: Arc<dyn IndexNode> = _pf.create("status", FileType::File, 0o777)?; in register_pid()
327 if let FileType::Dir = inode.metadata.file_type { in open()
348 if let FileType::Dir = guard.metadata.file_type { in close()
377 if inode.metadata.file_type == FileType::Dir { in read_at()
425 if inode.metadata.file_type == FileType::Dir { in poll()
463 if inode.metadata.file_type == FileType::File { in resize()
474 file_type: FileType, in create_with_data() argument
[all …]
/DragonOS-0.1.5/kernel/src/driver/disk/ahci/
Dahci_inode.rs3 core::generate_inode_id, make_rawdev, FilePrivateData, FileSystem, FileType, IndexNode,
53 file_type: FileType::BlockDevice, // 文件夹,block设备,char设备 in new()
/DragonOS-0.1.5/kernel/src/driver/keyboard/
Dps2_keyboard.rs6 vfs::{core::generate_inode_id, FileType, IndexNode, Metadata, PollStatus},
47 file_type: FileType::CharDevice, // 文件夹,block设备,char设备 in new()
/DragonOS-0.1.5/kernel/src/filesystem/fat/
Dfs.rs13 core::generate_inode_id, file::FilePrivateData, FileSystem, FileType, IndexNode, InodeId,
168 FileType::Dir in new()
170 FileType::File in new()
304 file_type: FileType::Dir, in new()
1404 if inode.metadata.file_type == FileType::Dir { in poll()
1416 file_type: FileType, in create() argument
1429 FileType::File => { in create()
1433 FileType::Dir => { in create()
1438 FileType::SymLink => return Err(-(ENOTSUP as i32)), in create()
1583 if guard.metadata.file_type != FileType::Dir { in get_entry_name()