Replies: 3 comments 8 replies
-
|
There is one wrinkle that we did not discuss: What should happen when there are multiple sources specified on the command-line. Anyway… For the case:
I believe the result should be I do not see anything else in the table that needs changing. === Then, the summary of this all almost becomes:
I say almost because we have a concession to the common practice of "copy a singular file/object to this already existing local directory (that tab-completion filled in for me)": If the left argument is a Pelican object, and the right argument is an already existing directory, we treat the right argument as if the user had appended the object's basename to it. The converse of this case, where the left argument is a local file, and the right argument maps to a POSIX directory behind the Pelican origin, is, in the table, flagged as an error. The lack of symmetry is perhaps unappealing, but in the former case, the user knows that the destination is a POSIX filesystem and thus knows how it behaves. It is a whole separate can of worms to specify and enforce a POSIX-compatible scheme on object names. |
Beta Was this translation helpful? Give feedback.
-
|
@brianaydemir @bbockelm Updated the table and added a line on multiple sources. |
Beta Was this translation helpful? Give feedback.
-
|
Ran into one case I don't think we can easily solve:
Our current code sees that If the This actually is in line with what we expect |
Beta Was this translation helpful? Give feedback.
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
-
What follows is a table showing what we want as the appropriate behavior for various types of uses of
pelican syncandpelican get/put --recursive@bbockelm @brianaydemir Please double check to make sure I got every case correct.pelican obj sync pelican://foo/bar /tmp/testpelican obj sync pelican://foo/bar /tmp/test/tmp/test/baz.txtfoo/barprefix into thetmp/testfolderpelican obj sync pelican://foo/bar /tmp/test/tmp/test/baz.txt/tmp/testfolder and puts the objects with thefoo/barprefix into thetmp/testfolderpelican obj sync pelican::/foo/bar.txt /tmp/testtmp/test/bar.txttmp/testdirectorypelican obj sync pelican::/foo/bar.txt /tmp/testtmp/test/foo/bar.txtintotmp/testand createstestpelican obj sync pelican::/foo/bar.txt /tmp/test/tmp/testfoo/bar.txtas/tmp/testpelican obj sync /tmp/test pelican://foo/barpelican://foo/bar/baz.txt/temp/test/at/foo/bar, creating namespace prefixes as neededpelican obj sync /tmp/test.txt pelican://foo/bar.txtpelican obj sync /tmp/test.txt pelican://foo/bar.txtpelican::/foo/bar.txtbar.txtis an object, overwrite the filepelican obj sync /tmp/test.txt pelican://foo/bar.txtpelican::foo/bar.txtWhen there are multiple sources specified on the command-line, we will iterate over each source and treat each one according to the table above.
Beta Was this translation helpful? Give feedback.
All reactions