KnpLabs/Gaufrette — pull request #71 by Romain-Geissler (2012-06-07 09:55:48+00:00)
Title: [Sftp] Better renaming strategy.

The current renaming stategy for Sftp is to download the whole file, copy its content into a new file and delete the old.

This just doesn't make sense !

- Relying on a client side renaming stategy is much more error prone than using the dedicated sftp command achieving this.
- The atomicity property of this operation should be the matter of the sftp server implementation, that is for sure much better handled than any php extension.
- Renaming a file should be done in constant time. With the current code, renaming a 1B file is much faster than renaming a 1GB file.