|
Basic Solution File System - BSFS
|
Implements the rm command for the BSFS filesystem. More...
Classes | |
| struct | rm_task_t |
| Prepared removal record used by the bulk rm implementation. More... | |
Macros | |
| #define | PATH_MAX 4096 |
Functions | |
| int | rm (FILE *disk, superblock_t *sb, char **args) |
| Remove a file (logical delete with Recovery snapshot). | |
Implements the rm command for the BSFS filesystem.
Removes files from the filesystem.
| int rm | ( | FILE * | disk, |
| superblock_t * | sb, | ||
| char ** | args ) |
Remove a file (logical delete with Recovery snapshot).
Unlinks the directory entry and inserts a snapshot into the Recovery tree so the file can be restored later. Prints a confirmation or a concise error message (including permission denied when applicable).
| disk | Open filesystem image. |
| sb | Loaded superblock. |
| args | Command argv-like vector; expects target path in args[1]. |