Description
I am attempting to use the DirFileSystem
to wrap SMBFileSystem
so I can operate in my SMB folder as though it's my base directory. I can use most methods I need just fine. For example mkdirs
and cp
work as expected.
However, when I use mv
I get TypeError: get_smb_tree() got an unexpected keyword argument 'recursive'
From the stack trace, I can see that this is actually using the mv
method from the AbstractFileSystem
class instead of the SMBFilesystem
. SMBFileSystem
implements mv
correctly but the fallback in AbstractFileSystem
performs a copy (with recursive passed in) and delete. This happens (I think) because DirFS inherits from AsyncFileSystem
which doesn't require move to be implemented.
This is problematic for two reasons:
- mv throws an error when used in this way. Simple enough.
- I would like to be able to use the SMB move functionality specifically, because I don't want my created and modified timestamps to change. Copy updates both timestamps.
Also, I'm happy to do work towards implementing a fix, but I don't know where to start to keep with the intended vision of this library.