You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I've implemented the AbstractFileSystem in my code in order to direct my application either to the local file system or file system over SSH. Only I noticed that the behavior of get_file is different in both. I wrote this little script to test and demonstrate.
I would expect that calling get_file on either with similar parameters would result the copying of the requested file to the local folder. Only the LocalFileSystem implementation results in an error:
IsADirectoryError: [Errno 21] Is a directory: '/home/west/Research/sshfs/.'
The LocalFileSystem implementation requires a full file path:
local_fs.get_file("/tmp/foobar2", "./foobar2")
I seems to me that the implemenation of get_file in SSHFileSystem does not follow the fsspec API. Or am I missing something?
The text was updated successfully, but these errors were encountered:
sguldemond
changed the title
get_file behaves differently using SSHFileSystem vs LocalFileSystem get_file behaves differently using SSHFileSystem vs LocalFileSystem Mar 21, 2022
Good catch! Indeed, it is an inconsistecy with LocalFileSystem. I'm not 100% sure how all other implementations behave though. My guess is that it probably depends on the underlying library that is used in particular implementation. One could possibly consider this an extended feature support, so I'm not sure if this is really worth going around and unifying across all implementations. This needs a bit more research to see if there is a more general solution that is feasible.
I've implemented the
AbstractFileSystem
in my code in order to direct my application either to the local file system or file system over SSH. Only I noticed that the behavior ofget_file
is different in both. I wrote this little script to test and demonstrate.I would expect that calling
get_file
on either with similar parameters would result the copying of the requested file to the local folder. Only theLocalFileSystem
implementation results in an error:The
LocalFileSystem
implementation requires a full file path:I seems to me that the implemenation of
get_file
inSSHFileSystem
does not follow thefsspec
API. Or am I missing something?The text was updated successfully, but these errors were encountered: