Make WordPress Core

Opened 14 months ago

Closed 14 months ago

Last modified 14 months ago

#57604 closed enhancement (fixed)

Docs: Document directory support in `FTP/SSH2` filesystem `::move()` methods.

Reported by: costdev's profile costdev Owned by: costdev's profile costdev
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)

#2 @audrasjb
14 months 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)

#3 @flixos90
14 months ago

  • Keywords commit added

@audrasjb Correct. Technically there is no dependency on each other, but makes more sense to commit #57375 first.

@SergeyBiryukov Since you're owning #57375, could you commit this one afterwards as well?

#4 @azaozz
14 months ago

  • Resolution set to fixed
  • Status changed from assigned to closed

In 55205:

Docs: Document directory support in FTP/SSH2 filesystem ::move() methods.

Props: costdev, flixos90, audrasjb.
Fixes: #57604.

Note: See TracTickets for help on using tickets.