diff options
| author | Richard Qin <richard.qin.x@gmail.com> | 2026-01-04 14:12:24 +0800 |
|---|---|---|
| committer | Richard Qin <richard.qin.x@gmail.com> | 2026-01-04 14:12:24 +0800 |
| commit | a64d25c07b31d57f8706073e11cd774d0880d6dd (patch) | |
| tree | a4bbae6cff94fa69eea30db865267b211eb4c86b /include/fs/fs.h | |
| parent | 210025560c80b48af4875af199f183ad709e3bf0 (diff) | |
| parent | d3cf3f08d1343d6b265516d5a79ce2d197b59d26 (diff) | |
| download | lume-a64d25c07b31d57f8706073e11cd774d0880d6dd.tar.gz lume-a64d25c07b31d57f8706073e11cd774d0880d6dd.tar.xz | |
Merge pull request #5 from Richard-Qin-001/dev/file-system
feat(file-system): implement read and write FAT32 File System and basic shell
Diffstat (limited to 'include/fs/fs.h')
| -rw-r--r-- | include/fs/fs.h | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/include/fs/fs.h b/include/fs/fs.h index f40bc0c..235ec80 100644 --- a/include/fs/fs.h +++ b/include/fs/fs.h @@ -57,6 +57,8 @@ public: virtual void getattr(struct kstat *st); // Truncate file (set size to 0, release all data blocks) virtual void truncate() = 0; + // Delete the file named 'name' from the directory (Unlink) + virtual int unlink(const char *name) = 0; }; // File System Abstraction (SuperBlock) @@ -90,4 +92,6 @@ namespace VFS Inode *get_root(); // Path Analysis Inode *namei(const char *path); + // Find the parent directory inode of the path, and copy the last part of the path (the file name) into the name buffer + Inode *nameiparent(const char *path, char *name); } // namespace VFS |
