Skip to content

Commit bf3eefc

Browse files
DirFileSystem.mv should call the underlying fs
1 parent b532078 commit bf3eefc

File tree

2 files changed

+7
-3
lines changed

2 files changed

+7
-3
lines changed

fsspec/implementations/dirfs.py

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -329,13 +329,15 @@ def makedirs(self, path, *args, **kwargs):
329329
def rmdir(self, path):
330330
return self.fs.rmdir(self._join(path))
331331

332-
def mv_file(self, path1, path2, **kwargs):
333-
return self.fs.mv_file(
332+
def mv(self, path1, path2, **kwargs):
333+
return self.fs.mv(
334334
self._join(path1),
335335
self._join(path2),
336336
**kwargs,
337337
)
338338

339+
mv_file = mv
340+
339341
def touch(self, path, **kwargs):
340342
return self.fs.touch(self._join(path), **kwargs)
341343

fsspec/implementations/local.py

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -150,11 +150,13 @@ def get_file(self, path1, path2, callback=None, **kwargs):
150150
def put_file(self, path1, path2, callback=None, **kwargs):
151151
return self.cp_file(path1, path2, **kwargs)
152152

153-
def mv_file(self, path1, path2, **kwargs):
153+
def mv(self, path1, path2, **kwargs):
154154
path1 = self._strip_protocol(path1, remove_trailing_slash=True)
155155
path2 = self._strip_protocol(path2, remove_trailing_slash=True)
156156
shutil.move(path1, path2)
157157

158+
mv_file = mv
159+
158160
def link(self, src, dst, **kwargs):
159161
src = self._strip_protocol(src)
160162
dst = self._strip_protocol(dst)

0 commit comments

Comments
 (0)