Skip to content

Commit

Permalink
is_file_on_remote
Browse files Browse the repository at this point in the history
  • Loading branch information
hpohekar committed Apr 24, 2024
1 parent 6f4b1fc commit 900c337
Showing 1 changed file with 3 additions and 5 deletions.
8 changes: 3 additions & 5 deletions src/ansys/fluent/core/utils/file_transfer_service.py
Original file line number Diff line number Diff line change
Expand Up @@ -234,12 +234,10 @@ def upload(
files = _get_files(file_name, self.host_mount_path)
if self.client:
for file in files:
is_file_exists_on_remote = self.file_exists_on_remote(
os.path.basename(file)
)
if is_file_exists_on_remote:
is_file_on_remote = self.file_exists_on_remote(os.path.basename(file))
if is_file_on_remote:
print(f"\n{file} already uploaded.\n")
elif os.path.isfile(file) and not is_file_exists_on_remote:
elif os.path.isfile(file) and not is_file_on_remote:
self.client.upload_file(
local_filename=file,
remote_filename=(
Expand Down

0 comments on commit 900c337

Please sign in to comment.