|
Basic Solution File System - BSFS
|
Implements the restore command for the BSFS filesystem. More...
Functions | |
| int | restore (FILE *disk, superblock_t *sb, char **args) |
| Restore a deleted file by recovery ID or original name. | |
Implements the restore command for the BSFS filesystem.
Restores a deleted file from the Recovery tree by its recovery ID.
Usage:
| int restore | ( | FILE * | disk, |
| superblock_t * | sb, | ||
| char ** | args ) |
Restore a deleted file by recovery ID or original name.
If the first argument parses as a numeric ID, restores that snapshot. Otherwise treats it as a name and disambiguates if multiple snapshots share the same name, printing a table of candidates with deletion timestamps.
| disk | Open filesystem image. |
| sb | Loaded superblock. |
| args | argv-like vector; id or name in args[1], optional dest dir in args[2]. |