Skip to content

BitBucketFS - An improved "dummy" file system #1

@lordofscripts

Description

@lordofscripts

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 or LinkError would be produced as per the normal os package operation, else it will not return an error.

Metadata

Metadata

Assignees

Labels

enhancementNew feature or request

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions