|
SimpleKernel 1.17.0
|
#include "vfs_types.hpp"

Go to the source code of this file.
Classes | |
| struct | vfs::Inode |
| Inode — 文件元数据(独立于路径名) More... | |
| struct | vfs::Dentry |
| Dentry — 目录项缓存(路径名 ↔ Inode 的映射) More... | |
| struct | vfs::File |
| File — 打开的文件实例(每次 open 产生一个) More... | |
Namespaces | |
| namespace | vfs |
Functions | |
| auto | vfs::Init () -> Expected< void > |
| VFS 全局初始化 | |
| auto | vfs::Lookup (const char *path) -> Expected< Dentry * > |
| 路径解析,查找 dentry | |
| auto | vfs::Open (const char *path, OpenFlags flags) -> Expected< File * > |
| 打开文件 | |
| auto | vfs::Close (File *file) -> Expected< void > |
| 关闭文件 | |
| auto | vfs::Read (File *file, void *buf, size_t count) -> Expected< size_t > |
| 从文件读取数据 | |
| auto | vfs::Write (File *file, const void *buf, size_t count) -> Expected< size_t > |
| 向文件写入数据 | |
| auto | vfs::Seek (File *file, int64_t offset, SeekWhence whence) -> Expected< uint64_t > |
| 调整文件偏移量 | |
| auto | vfs::MkDir (const char *path) -> Expected< void > |
| 创建目录 | |
| auto | vfs::RmDir (const char *path) -> Expected< void > |
| 删除目录 | |
| auto | vfs::Unlink (const char *path) -> Expected< void > |
| 删除文件 | |
| auto | vfs::ReadDir (File *file, DirEntry *dirent, size_t count) -> Expected< size_t > |
| 读取目录内容 | |
| auto | vfs::GetRootDentry () -> Dentry * |
| 获取根目录 dentry | |