-
Notifications
You must be signed in to change notification settings - Fork 22
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
Feature Request: Support Files.move(...) #339
Comments
Apologies for the delay in responding. Objects in S3 only have a created time and to change that the object would have to be recreated (basically copied deleted and rewritten) so Simple enough for me (or anyone) to implement, do you see any problems with not being able to actually set the times? |
I wasn't aware of this limitation on S3. In that case, I think your proposed solution is great. Thank you. |
PR is merged. I believe it resolves the issue. Let me know if it doesn't. |
When doing
Files.move(...)
, Java will go throughCopyMoveHelper.moveToForeignTarget(...)
which has a private methodconvertMoveToCopyOptions(...)
which will always addStandardCopyOption.COPY_ATTRIBUTES
then in the other private methodcopyToForeignTarget(...)
it will lead it to go through theif (opts.copyAttributes)
path and ultimately call theview.setTimes(...)
method which unfortunately in this library contains:I can workaround it for now by doing a
Files.copy(...)
and thenFiles.delete(...)
since the time attributes are not critical. But I would appreciate if you could consider it for future releases.Thank you.
The text was updated successfully, but these errors were encountered: