vfs
vfs copied to clipboard
Dummy Filesystem feature
Would have been nice if DummyFS also had the capability of, not only doing nothing but instead just printing to console the operation name (Remove, Rename, etc.) and its main parameter. This could be outputted to the console, or log, or via a user-defined callback (more flexible). For example
// An instance of Dummy Filesystem which returns no error instead of error on everything
dummyFS := dummy.Create(nil)
// call dummy filesystem operation
dummyFS.RemoveAll("/usr/share")
Which wouldn't cause an error and instead output this somewhere:
⚡ os.RemoveAll /usr/share/
This would be more useful than for doing dry runs.