Currently reana-client does not support downloading directories:
$ reana-client ls -w roofit
NAME SIZE LAST-MODIFIED
results/plot.png 15450 2020-03-24T11:25:59
results/data.root 154454 2020-03-24T11:25:52
code/fitdata.C 1648 2020-03-24T11:25:38
code/gendata.C 1937 2020-03-24T11:25:38
$ reana-client download -w roofit results
File results downloaded to /home/simko/private/project/reana/src/reana-demo-root6-roofit.
$ ls -l results
-rw-r--r-- 1 simko simko 38 Mar 24 15:16 results
$ cat results
{"message":"results does not exist."}
This is "expected", because directory download support has not been added yet.
Expected behaviour
What we can do to improve the behaviour:
(1) At the least, we should verify on the server side whether the object the user wanted to download is a file, and if yes, proceed; if not, report an error.
(2) Ideally, we should add support for proper directory download, because some workflows may generate many files. So, if the user asks for a directory, then the server could iterate over its files and download them one by one, or return a zip file or something.
Current behaviour
Currently
reana-client
does not support downloading directories:This is "expected", because directory download support has not been added yet.
Expected behaviour
What we can do to improve the behaviour:
(1) At the least, we should verify on the server side whether the object the user wanted to download is a file, and if yes, proceed; if not, report an error.
(2) Ideally, we should add support for proper directory download, because some workflows may generate many files. So, if the user asks for a directory, then the server could iterate over its files and download them one by one, or return a zip file or something.