Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add fileset folder creation #427

Open
wants to merge 5 commits into
base: master
Choose a base branch
from
Open
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Next Next commit
fix backward compatibility issue raised by sbesson
  • Loading branch information
Rdornier committed Sep 26, 2024
commit fb11dc0ca13c6ba885e09d623e2ccc05f5fa9b65
5 changes: 3 additions & 2 deletions src/omero/plugins/download.py
Original file line number Diff line number Diff line change
Expand Up @@ -87,10 +87,11 @@ def __call__(self, args):
# only expect single file
self.download_file(client, orig_file, target_file)

def download_fileset(self, conn, fileset, dir_path):
def download_fileset(self, conn, fileset, dir_path, insert_fileset_folder=False):
self.ctx.out(f"Fileset: {fileset.id}")
template_prefix = fileset.getTemplatePrefix()
dir_path = os.path.join(dir_path, f"Fileset_{fileset.id}")
if insert_fileset_folder:
dir_path = os.path.join(dir_path, f"Fileset_{fileset.id}")
for orig_file in fileset.listFiles():
file_path = orig_file.path.replace(template_prefix, "")
target_dir = os.path.join(dir_path, file_path)
Expand Down