tar_commands
Prepare tar commands for task-subfolder compression/extraction.
get_tar_compression_cmd(subfolder_path, filelist_path)
¶
Prepare command to compress e.g. /path/dir into /path/dir.tar.gz.
Note that /path/dir.tar.gz may already exist. In this case, it will
be overwritten.
| PARAMETER | DESCRIPTION |
|---|---|
subfolder_path
|
Absolute path to the folder to compress.
TYPE:
|
filelist_path
|
If set, to be used in the
TYPE:
|
| RETURNS | DESCRIPTION |
|---|---|
str
|
tar command |
Source code in fractal_server/runner/executors/slurm_ssh/tar_commands.py
7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 | |
get_tar_extraction_cmd(archive_path)
¶
Prepare command to extract e.g. /path/dir.tar.gz into /path/dir.
| PARAMETER | DESCRIPTION |
|---|---|
archive_path
|
Absolute path to the tar.gz archive.
TYPE:
|
| RETURNS | DESCRIPTION |
|---|---|
tuple[Path, str]
|
Target extraction folder and tar command |
Source code in fractal_server/runner/executors/slurm_ssh/tar_commands.py
42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 | |