Skip to content

Commit aa1a301

Browse files
add positional argument to localFS mv (fsspec#1820)
Co-authored-by: Martin Durant <[email protected]>
1 parent c2f8c63 commit aa1a301

File tree

1 file changed

+5
-1
lines changed

1 file changed

+5
-1
lines changed

fsspec/implementations/local.py

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -154,7 +154,11 @@ def get_file(self, path1, path2, callback=None, **kwargs):
154154
def put_file(self, path1, path2, callback=None, **kwargs):
155155
return self.cp_file(path1, path2, **kwargs)
156156

157-
def mv(self, path1, path2, **kwargs):
157+
def mv(self, path1, path2, recursive: bool = True, **kwargs):
158+
"""Move files/directories
159+
For the specific case of local, all ops on directories are recursive and
160+
the recursive= kwarg is ignored.
161+
"""
158162
path1 = self._strip_protocol(path1)
159163
path2 = self._strip_protocol(path2)
160164
shutil.move(path1, path2)

0 commit comments

Comments
 (0)