However, this is believed to be less and less likely as things move towards sFTP. While the PHP Manual says that it may not be available on all servers, I spoke to in the #hosting-community channel who believes that this may be because the FTP SIZE command was introduced in 2002 and in the years that followed, this may not have been enabled by some. Using ftp_size() looks like a better option. As the number of files in the directory are unknown, this approach has inconsistent performance. Using ftp_nlist() requires checking an array. This ticket proposes making WP_Filesystem_FTPext::exists() and WP_Filesystem_ftpsockets::exists() compliant with RFC 959 by only using NLST on directories, rather than on both directories and files.
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |