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

MantaClient.move() does not support moving a file to a non-existent directory #256

Closed
dekobon opened this issue Jun 14, 2017 · 2 comments
Closed
Assignees

Comments

@dekobon
Copy link
Contributor

dekobon commented Jun 14, 2017

Current move() behavior does not let you move a file into a directory that does not currently exist. However, because S3 and Swift both virtualize directories in the form of keys, many libraries (I'm looking at you Hadoop Filesystem) support move semantics that allow for creating a directory structure when moving a file.

@dekobon dekobon self-assigned this Jun 14, 2017
@dekobon dekobon changed the title MantaClient.move() doesn't support moving a file to a non-existent directory MantaClient.move() does not support moving a file to a non-existent directory Jun 14, 2017
dekobon added a commit that referenced this issue Jun 14, 2017
@cburroughs
Copy link
Contributor

Stepping back a bit, why is this a desirable feature? It looks like another sharp tool to shoot yourself in the foot with.

I'm also not sure it is the default behavior I would expect as a user:

$ mv foo /tmp/does/not/exist
mv: cannot move ‘foo’ to ‘/tmp/does/not/exist’: No such file or directory

@dekobon
Copy link
Contributor Author

dekobon commented Jun 14, 2017

This covers a gap for users / third-party libraries integrating. S3 virtualizes a file system by storing keys with path separators, Manta does not. This means that adding an object to a directory that doesn't exist is essentially just adding a key. We don't have a way to fill that gap other than this functionality.

dekobon added a commit that referenced this issue Jun 14, 2017
…directories (#258)

* Fixes #256
* Added additional move() signature that allows you to support or not support recursive dir creation on move.
* Updated changelog.
* Added additional test to "move" test group.
* Added null and empty string validation for move() source and destination path.
* Removed @test for utility method.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants