Steve
Steve

Reputation: 4701

Spring Integration SftpSession will rmdir delete a non-empty directory?

The javadoc is pretty sparse on this. If I have

sftp = sftpFactory.getSession();
sftp.rmdir(directory);

where "directory" is non-empty, would I expect it to delete the directory and all its contents?

Additionally, will sftp.rename(file, newfile) overwrite by default?

If documentation on this exists that I've just missed, I apologize and would be grateful for a link.

Upvotes: 0

Views: 98

Answers (1)

Gary Russell
Gary Russell

Reputation: 174699

Such operations are a function of the remote filesystem, not the sftp client.

Typically,

  • No; the directory won't be deleted.
  • No; the rename will fail.

Upvotes: 1

Related Questions