Create extra tools to help know the internal status of the file system
ogregoire opened this issue · 1 comments
Is there any way to have tools that work like unix commands but on Jimfs? I think about ls -l
, find
, etc.
Usually when tests are developed on a physical file system, we use directly commands like ls
and find
to understand the current status. That solution is the pragmatic way of working. This is also why there are no library that does it already (to my knowledge, and after a thorough search).
With Jimfs, the fs is not persistent and therefore I cannot use external tools. This is why I specifically request this for Jimfs.
The goal here is mostly to know what is the current status of the memory fs. For instance when you work with several files and some give errors I want to be able to know exactly what I have on my fs.
Currently, my workaround is to develop tests on an actual fs and then switch to Jimfs when the test is stable so that I don't need to use the CI actual hard drive.
For debugging my unit-tests I would be happy with just a tree
command. I'm not sure if this belongs in the core library, however.