-
-
Notifications
You must be signed in to change notification settings - Fork 0
Description
The Problem
The original VFS repository includes a "Dummy" File system (FS) which simply blurts out a user-defined error on every operation. While it works for examples, it is inflexible and it has very little use in real life.
Use Cases
The proposed BitBucketFS could be used as a dry-run on other applications, as it will soon be in wipechromium. For example, in wipechromium
rather than performing a cleanup on the actual filesystem (deleting files/directories in the cache or privacy-compromising areas), it would simply tell the user what it would create/delete without actually doing it (dry mode). Afterwards the user could decide to perform the operation on the real file system (wet mode).
Proposed Requirements
This is what BitBucketFS would do. It is sort of an hybrid between DummyFS and MemFS.
- The option to operate like Dummy, throwing a user-defined error on calls but only when it warrants.
- The option to simply output to the console the name of the operation (Rename, Remove, etc.) and its parameter. This would be the Silent Mode.
- Be able to specify a list of place-holder directories that would be recognized as existent if an operation is called upon them.
- Be able to specify a list of place-holder files that would be recognized as existent if an operation is called upon them.
- In non-silent mode any operation would be outputted to the console (see Option Nº2), and then if the file or directory is not in the place-holders list, then an appropriate
PathError
orLinkError
would be produced as per the normalos
package operation, else it will not return an error.