-
Notifications
You must be signed in to change notification settings - Fork 603
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
SFTP Rename with flags (atomic) #563
Comments
lucamilanesio
added a commit
to lucamilanesio/sshj
that referenced
this issue
Dec 7, 2020
The SFTP protocol allows to rename files by specifying extra flags: - OVERWRITE - ATOMIC - NATIVE The flags are exposed through a new RenameFlags enum and can be passed as parameters to the rename() method in SFTPClient/SFTPEngine. Relates to hierynomus#563
@ahweis what happened to this issue? I provided a possible solution with the associated PR, can you have a look if that makes sense? |
hierynomus
added a commit
that referenced
this issue
Sep 27, 2021
* Enable renaming with flags The SFTP protocol allows to rename files by specifying extra flags: - OVERWRITE - ATOMIC - NATIVE The flags are exposed through a new RenameFlags enum and can be passed as parameters to the rename() method in SFTPClient/SFTPEngine. Relates to #563 * Update RenameFlags.java * Update RenameFlags.java * Align license header with all other files * Make RenameFlags parameter in line with OpenMode(s) Co-authored-by: Jeroen van Erp <jeroen@hierynomus.com>
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
The default SSH rename command do not sent any flags for how to handle the rename. In the SSH spec it is possible to send the three flags:
SSH_FXF_RENAME_OVERWRITE 0x00000001
SSH_FXF_RENAME_ATOMIC 0x00000002
SSH_FXF_RENAME_NATIVE 0x00000004
At the last uint32 part of the rename command. Will it be possible to extend the rename function to support a list of flags to include (default to 0) or create an overloaded function that supports this.
The text was updated successfully, but these errors were encountered: