filesystem_spec
filesystem_spec copied to clipboard
new fs: dict of file objects
Similar to MemoryFilesystem, opposite of get_mapper.
The use case is to compose (not layer) a 'global' fs where keys are arbitrary and file objects are also arbitrary.
Would you mind providing a little more detail on the API you'd like to see? Is this something you are planning to work on or just want feedback, or a feature you would like to see developed for the library (by others)?
Would you mind providing a little more detail on the API you'd like to see? Is this something you are planning to work on or just want feedback, or a feature you would like to see developed for the library (by others)?
For now it's just an idea. I've ran into situations where I might be working with more than one fs and just want to put it together (much like you would with a real fs). Another might be to handle situations where you have nested fs (like rar in rar). The constructor should take an arbitrary number of maps (nestedkeys or slashedkeys: file obj) and give back a fsspec object.
I'm not really following how this would work from the user's point of view. You want a filesystem which "mounts" other filesystems?
I'm not really following how this would work from the user's point of view. You want a filesystem which "mounts" other filesystems?
from fs point of view, yes.
I would appreciate an example of how you would use this is code
I would appreciate an example of how you would use this is code
I don't think the api is much more than fssspec.compose(fs1, fs2, ...) where some kind of precedence can be established from the argument order to resolve path conflicts.
I think the work in #828 might cover what you want. I don't see a need for a filesystem of filesystems beyond that, unless you can make a compelling case.