#57604 closed enhancement (fixed)
Docs: Document directory support in `FTP/SSH2` filesystem `::move()` methods.
| Reported by: |
|
Owned by: |
|
|---|---|---|---|
| Milestone: | 6.2 | Priority: | normal |
| Severity: | normal | Version: | 2.5 |
| Component: | Filesystem API | Keywords: | has-patch commit |
| Focuses: | docs | Cc: |
Description
This is a follow-up to #57375.
With directory support added to WP_Filesystem_Direct::move() in #57375, we should update the documentation of the other filesystem ::move() methods to document their inherent directory support.
WP_Filesystem_FTPext::move()
WP_Filesystem_FTPext::move() calls ftp_rename() - "Renames a file or a directory on the FTP server"
WP_Filesystem_ftpsockets::move()
WP_Filesystem_ftpsockets::move() calls $this->ftp->rename - Uses RNFR/RNTO which work on files and directories.
WP_Filesystem_SSH2::move()
WP_Filesystem_SSH2::move() calls ssh2_sftp_rename Ultimately calls sftp_rename (C).
While this states "Rename a file on the remote server", the "Removing and Renaming Files" section at http://www.openssh.com/txt/draft-ietf-secsh-filexfer-02.txt states:
Files (and directories) can be renamed using the SSH_FXP_RENAME message.
This is what libssh2's sftp_rename function uses: Ref (C).
Change History (5)
This ticket was mentioned in PR #3963 on WordPress/wordpress-develop by @costdev.
3 years ago
#1
#2
@
3 years ago
This sounds good, but we need to wait for #57375 to be committed, right?
(unrelated, but it would be nice to have a way to clearly indicate tickets dependencies)
Trac ticket: https://core.trac.wordpress.org/ticket/57604