User-defined timeout for copy and move

Signed-off-by: Michal Mielewczyk <michal.mielewczyk@huawei.com>
This commit is contained in:
Michal Mielewczyk
2024-10-03 09:06:06 +02:00
parent b5a6cfbb93
commit cb0ac3ba3a
2 changed files with 8 additions and 6 deletions

View File

@@ -54,8 +54,9 @@ class File(FsItem):
destination,
force: bool = False,
recursive: bool = False,
dereference: bool = False):
fs_utils.copy(str(self), destination, force, recursive, dereference)
dereference: bool = False,
timeout: timedelta = timedelta(minutes=30)):
fs_utils.copy(str(self), destination, force, recursive, dereference, timeout)
if fs_utils.check_if_directory_exists(destination):
path = f"{destination}{'/' if destination[-1] != '/' else ''}{self.name}"
else: