pyslk.archive_raw

Contents

pyslk.archive_raw#

pyslk.archive_raw(src_path: str | list | Path, dst_gns: str | Path, partsize: int | None = None, streams: int | None = None, stats: bool = False, recursive: bool = False, preserve_permissions: bool = False, exclude_hidden: bool = False, verbose: bool = False, double_verbose: bool = False, return_type: int = 0) str | int | CompletedProcess#
Upload files in a directory and optionally tag resources

using directory path and GNS path

Parameters:
  • src_path (str or list or Path) – search id or gns path of resources to retrieve

  • dst_gns (str or Path) – destination directory for retrieval

  • partsize (int) – size of each file to download per stream, Default: 500

  • streams (int) – number of file part streams to use per node, Default: 4

  • stats (bool) – Display part & I/O stats for each node; Default: False

  • recursive (bool) – use the -R flag to archive recursively, Default: False

  • preserve_permissions (bool) – preserve original file permission, Default: False

  • exclude_hidden (bool) – exclude . (hidden) files, Default: False

  • verbose (bool) – single verbose mode, Default: False

  • double_verbose (bool) – double verbose mode, Default: False

  • return_type (int) – select between 0 (== str output), 1 (== exit code), 2 (subprocess output)

Returns:

stdout of the slk_helpers call

Return type:

Union[str, int, subprocess.CompletedProcess]