Open mxmlnkn opened 2 months ago
Perhaps it is poorly written, but this means:
The HTTP file system is also inconsistent in regards to requiring the full URL specification for each listdir
, open
, etc. call. This is in stark contrast to the other implementations. See https://github.com/ray-project/ray/issues/26423
Furthermore, some implementations return the name
with leading /
(fsspec.implementations.ftp.FTPFileSystem
, sshfs.SSHF
), some without (fsspec.implementations.git.GitFileSystem
), which was another source of bugs for my wrapper. I am surprised that I have not encountered a filesystem yet that returns simply the file name just as the name
key implies instead of the absolute path, but I still have 4+ other fsspec implementations that I still need to test and "implement" ...
(ref #1713)
some implementations return the name with leading /
Implementations have a root_marker
class attribute that is typically "" or "/" to distinguish this behaviour.
The API specification for
listdir
and by inference alsoinfo
reads:I don't really understand the comment. "is TBD, but must be consistent across implementations" is an oxymoron. How can it be consistent between implementations when it is not specified yet? In order to increase the usefulness of the
filesystem_spec
API, this should be specified, imo.Consider for example this:
Output:
This is not consistent between these only two tested implementations:
mtime
is datetime in the SSH backend, but a float for the local interface. This is already mentioned in #526, and probably should be a nanoseconds integer.type: 'link'
while the local one returnstype: 'other'
and anotherislink
key.~The other implementations should also be tested.~ There is a nice comprehensive overview here. Code for all, but concrete examples are missing for some.