From c0ecd8ab8ae62789aa7ad818ba254bf412c0fb69 Mon Sep 17 00:00:00 2001 From: WispX <1591788658@qq.com> Date: Sun, 1 Mar 2020 00:01:54 +0800 Subject: [PATCH] :package: Updating compiled files or packages. --- composer.lock | 12 ++-- vendor/composer/installed.json | 14 ++-- .../src/FtpClient/FtpClient.php | 60 +++++++++-------- .../src/FtpClient/FtpWrapper.php | 64 +++++++++---------- 4 files changed, 78 insertions(+), 72 deletions(-) diff --git a/composer.lock b/composer.lock index 2f92de9f..65a0d4ec 100644 --- a/composer.lock +++ b/composer.lock @@ -334,16 +334,16 @@ }, { "name": "nicolab/php-ftp-client", - "version": "v1.5.1", + "version": "v1.5.2", "source": { "type": "git", "url": "https://github.com/Nicolab/php-ftp-client.git", - "reference": "8c66e1104da1b638f5d7a9e24624a5525b459a0c" + "reference": "8970bdb69b212779338624c0882c256e0833ff31" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/Nicolab/php-ftp-client/zipball/8c66e1104da1b638f5d7a9e24624a5525b459a0c", - "reference": "8c66e1104da1b638f5d7a9e24624a5525b459a0c", + "url": "https://github-api-proxy.cnpkg.org/repos/Nicolab/php-ftp-client/zipball/8970bdb69b212779338624c0882c256e0833ff31", + "reference": "8970bdb69b212779338624c0882c256e0833ff31", "shasum": "" }, "require": { @@ -356,7 +356,7 @@ "FtpClient": "src/" } }, - "notification-url": "https://packagist.org/downloads/", + "notification-url": "https://repo.packagist.org/downloads/", "license": [ "MIT" ], @@ -379,7 +379,7 @@ "ssl", "ssl-ftp" ], - "time": "2019-04-23T09:22:37+00:00" + "time": "2019-12-02T18:06:47+00:00" }, { "name": "phpmailer/phpmailer", diff --git a/vendor/composer/installed.json b/vendor/composer/installed.json index bc251f26..df8796e3 100644 --- a/vendor/composer/installed.json +++ b/vendor/composer/installed.json @@ -337,24 +337,24 @@ }, { "name": "nicolab/php-ftp-client", - "version": "v1.5.1", - "version_normalized": "1.5.1.0", + "version": "v1.5.2", + "version_normalized": "1.5.2.0", "source": { "type": "git", "url": "https://github.com/Nicolab/php-ftp-client.git", - "reference": "8c66e1104da1b638f5d7a9e24624a5525b459a0c" + "reference": "8970bdb69b212779338624c0882c256e0833ff31" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/Nicolab/php-ftp-client/zipball/8c66e1104da1b638f5d7a9e24624a5525b459a0c", - "reference": "8c66e1104da1b638f5d7a9e24624a5525b459a0c", + "url": "https://github-api-proxy.cnpkg.org/repos/Nicolab/php-ftp-client/zipball/8970bdb69b212779338624c0882c256e0833ff31", + "reference": "8970bdb69b212779338624c0882c256e0833ff31", "shasum": "" }, "require": { "ext-ftp": "*", "php": ">=5.4" }, - "time": "2019-04-23T09:22:37+00:00", + "time": "2019-12-02T18:06:47+00:00", "type": "library", "installation-source": "dist", "autoload": { @@ -362,7 +362,7 @@ "FtpClient": "src/" } }, - "notification-url": "https://packagist.org/downloads/", + "notification-url": "https://repo.packagist.org/downloads/", "license": [ "MIT" ], diff --git a/vendor/nicolab/php-ftp-client/src/FtpClient/FtpClient.php b/vendor/nicolab/php-ftp-client/src/FtpClient/FtpClient.php index 1b55b7c0..d9e1212f 100644 --- a/vendor/nicolab/php-ftp-client/src/FtpClient/FtpClient.php +++ b/vendor/nicolab/php-ftp-client/src/FtpClient/FtpClient.php @@ -16,32 +16,32 @@ use \Countable; /** * The FTP and SSL-FTP client for PHP. * - * @method bool alloc() alloc(int $filesize, string &$result = null) Allocates space for a file to be uploaded - * @method bool cdup() cdup() Changes to the parent directory - * @method bool chdir() chdir(string $directory) Changes the current directory on a FTP server - * @method int chmod() chmod(int $mode, string $filename) Set permissions on a file via FTP - * @method bool delete() delete(string $path) Deletes a file on the FTP server - * @method bool exec() exec(string $command) Requests execution of a command on the FTP server - * @method bool fget() fget(resource $handle, string $remote_file, int $mode, int $resumepos = 0) Downloads a file from the FTP server and saves to an open file - * @method bool fput() fput(string $remote_file, resource $handle, int $mode, int $startpos = 0) Uploads from an open file to the FTP server - * @method mixed get_option() get_option(int $option) Retrieves various runtime behaviours of the current FTP stream - * @method bool get() get(string $local_file, string $remote_file, int $mode, int $resumepos = 0) Downloads a file from the FTP server - * @method int mdtm() mdtm(string $remote_file) Returns the last modified time of the given file - * @method int nb_continue() nb_continue() Continues retrieving/sending a file (non-blocking) - * @method int nb_fget() nb_fget(resource $handle, string $remote_file, int $mode, int $resumepos = 0) Retrieves a file from the FTP server and writes it to an open file (non-blocking) - * @method int nb_fput() nb_fput(string $remote_file, resource $handle, int $mode, int $startpos = 0) Stores a file from an open file to the FTP server (non-blocking) - * @method int nb_get() nb_get(string $local_file, string $remote_file, int $mode, int $resumepos = 0) Retrieves a file from the FTP server and writes it to a local file (non-blocking) - * @method int nb_put() nb_put(string $remote_file, string $local_file, int $mode, int $startpos = 0) Stores a file on the FTP server (non-blocking) - * @method bool pasv() pasv(bool $pasv) Turns passive mode on or off - * @method bool put() put(string $remote_file, string $local_file, int $mode, int $startpos = 0) Uploads a file to the FTP server - * @method string pwd() pwd() Returns the current directory name - * @method bool quit() quit() Closes an FTP connection - * @method array raw() raw(string $command) Sends an arbitrary command to an FTP server - * @method bool rename() rename(string $oldname, string $newname) Renames a file or a directory on the FTP server - * @method bool set_option() set_option(int $option, mixed $value) Set miscellaneous runtime FTP options - * @method bool site() site(string $command) Sends a SITE command to the server - * @method int size() size(string $remote_file) Returns the size of the given file - * @method string systype() systype() Returns the system type identifier of the remote FTP server + * @method bool alloc(int $filesize, string &$result = null) Allocates space for a file to be uploaded + * @method bool cdup() Changes to the parent directory + * @method bool chdir(string $directory) Changes the current directory on a FTP server + * @method int chmod(int $mode, string $filename) Set permissions on a file via FTP + * @method bool delete(string $path) Deletes a file on the FTP server + * @method bool exec(string $command) Requests execution of a command on the FTP server + * @method bool fget(resource $handle, string $remote_file, int $mode, int $resumepos = 0) Downloads a file from the FTP server and saves to an open file + * @method bool fput(string $remote_file, resource $handle, int $mode, int $startpos = 0) Uploads from an open file to the FTP server + * @method mixed get_option(int $option) Retrieves various runtime behaviours of the current FTP stream + * @method bool get(string $local_file, string $remote_file, int $mode, int $resumepos = 0) Downloads a file from the FTP server + * @method int mdtm(string $remote_file) Returns the last modified time of the given file + * @method int nb_continue() Continues retrieving/sending a file (non-blocking) + * @method int nb_fget(resource $handle, string $remote_file, int $mode, int $resumepos = 0) Retrieves a file from the FTP server and writes it to an open file (non-blocking) + * @method int nb_fput(string $remote_file, resource $handle, int $mode, int $startpos = 0) Stores a file from an open file to the FTP server (non-blocking) + * @method int nb_get(string $local_file, string $remote_file, int $mode, int $resumepos = 0) Retrieves a file from the FTP server and writes it to a local file (non-blocking) + * @method int nb_put(string $remote_file, string $local_file, int $mode, int $startpos = 0) Stores a file on the FTP server (non-blocking) + * @method bool pasv(bool $pasv) Turns passive mode on or off + * @method bool put(string $remote_file, string $local_file, int $mode, int $startpos = 0) Uploads a file to the FTP server + * @method string pwd() Returns the current directory name + * @method bool quit() Closes an FTP connection + * @method array raw(string $command) Sends an arbitrary command to an FTP server + * @method bool rename(string $oldname, string $newname) Renames a file or a directory on the FTP server + * @method bool set_option(int $option, mixed $value) Set miscellaneous runtime FTP options + * @method bool site(string $command) Sends a SITE command to the server + * @method int size(string $remote_file) Returns the size of the given file + * @method string systype() Returns the system type identifier of the remote FTP server * * @author Nicolas Tallefourtane */ @@ -401,7 +401,7 @@ class FtpClient implements Countable // remove children foreach ($files as $file) { - $this->remove($file, true); + $this->remove($directory.'/'.$file, true); } } @@ -445,6 +445,10 @@ class FtpClient implements Countable */ public function remove($path, $recursive = false) { + if ($path == '.' || $path == '..') { + return false; + } + try { if (@$this->ftp->delete($path) or ($this->isDir($path) and $this->rmdir($path, $recursive))) { @@ -658,6 +662,8 @@ class FtpClient implements Countable } } + $d->close(); + return $this; } diff --git a/vendor/nicolab/php-ftp-client/src/FtpClient/FtpWrapper.php b/vendor/nicolab/php-ftp-client/src/FtpClient/FtpWrapper.php index fc763a07..f2b9452c 100644 --- a/vendor/nicolab/php-ftp-client/src/FtpClient/FtpWrapper.php +++ b/vendor/nicolab/php-ftp-client/src/FtpClient/FtpWrapper.php @@ -14,38 +14,38 @@ namespace FtpClient; /** * Wrap the PHP FTP functions * - * @method bool alloc() alloc(int $filesize, string &$result = null) Allocates space for a file to be uploaded - * @method bool cdup() cdup() Changes to the parent directory - * @method bool chdir() chdir(string $directory) Changes the current directory on a FTP server - * @method int chmod() chmod(int $mode, string $filename) Set permissions on a file via FTP - * @method bool close() close() Closes an FTP connection - * @method bool delete() delete(string $path) Deletes a file on the FTP server - * @method bool exec() exec(string $command) Requests execution of a command on the FTP server - * @method bool fget() fget(resource $handle, string $remote_file, int $mode, int $resumepos = 0) Downloads a file from the FTP server and saves to an open file - * @method bool fput() fput(string $remote_file, resource $handle, int $mode, int $startpos = 0) Uploads from an open file to the FTP server - * @method mixed get_option() get_option(int $option) Retrieves various runtime behaviours of the current FTP stream - * @method bool get() get(string $local_file, string $remote_file, int $mode, int $resumepos = 0) Downloads a file from the FTP server - * @method bool login() login(string $username, string $password) Logs in to an FTP connection - * @method int mdtm() mdtm(string $remote_file) Returns the last modified time of the given file - * @method string mkdir() mkdir(string $directory) Creates a directory - * @method int nb_continue() nb_continue() Continues retrieving/sending a file (non-blocking) - * @method int nb_fget() nb_fget(resource $handle, string $remote_file, int $mode, int $resumepos = 0) Retrieves a file from the FTP server and writes it to an open file (non-blocking) - * @method int nb_fput() nb_fput(string $remote_file, resource $handle, int $mode, int $startpos = 0) Stores a file from an open file to the FTP server (non-blocking) - * @method int nb_get() nb_get(string $local_file, string $remote_file, int $mode, int $resumepos = 0) Retrieves a file from the FTP server and writes it to a local file (non-blocking) - * @method int nb_put() nb_put(string $remote_file, string $local_file, int $mode, int $startpos = 0) Stores a file on the FTP server (non-blocking) - * @method array nlist() nlist(string $directory) Returns a list of files in the given directory - * @method bool pasv() pasv(bool $pasv) Turns passive mode on or off - * @method bool put() put(string $remote_file, string $local_file, int $mode, int $startpos = 0) Uploads a file to the FTP server - * @method string pwd() pwd() Returns the current directory name - * @method bool quit() quit() Closes an FTP connection - * @method array raw() raw(string $command) Sends an arbitrary command to an FTP server - * @method array rawlist() rawlist(string $directory, bool $recursive = false) Returns a detailed list of files in the given directory - * @method bool rename() rename(string $oldname, string $newname) Renames a file or a directory on the FTP server - * @method bool rmdir() rmdir(string $directory) Removes a directory - * @method bool set_option() set_option(int $option, mixed $value) Set miscellaneous runtime FTP options - * @method bool site() site(string $command) Sends a SITE command to the server - * @method int size() size(string $remote_file) Returns the size of the given file - * @method string systype() systype() Returns the system type identifier of the remote FTP server + * @method bool alloc(int $filesize, string &$result = null) Allocates space for a file to be uploaded + * @method bool cdup() Changes to the parent directory + * @method bool chdir(string $directory) Changes the current directory on a FTP server + * @method int chmod(int $mode, string $filename) Set permissions on a file via FTP + * @method bool close() Closes an FTP connection + * @method bool delete(string $path) Deletes a file on the FTP server + * @method bool exec(string $command) Requests execution of a command on the FTP server + * @method bool fget(resource $handle, string $remote_file, int $mode, int $resumepos = 0) Downloads a file from the FTP server and saves to an open file + * @method bool fput(string $remote_file, resource $handle, int $mode, int $startpos = 0) Uploads from an open file to the FTP server + * @method mixed get_option(int $option) Retrieves various runtime behaviours of the current FTP stream + * @method bool get(string $local_file, string $remote_file, int $mode, int $resumepos = 0) Downloads a file from the FTP server + * @method bool login(string $username, string $password) Logs in to an FTP connection + * @method int mdtm(string $remote_file) Returns the last modified time of the given file + * @method string mkdir(string $directory) Creates a directory + * @method int nb_continue() Continues retrieving/sending a file (non-blocking) + * @method int nb_fget(resource $handle, string $remote_file, int $mode, int $resumepos = 0) Retrieves a file from the FTP server and writes it to an open file (non-blocking) + * @method int nb_fput(string $remote_file, resource $handle, int $mode, int $startpos = 0) Stores a file from an open file to the FTP server (non-blocking) + * @method int nb_get(string $local_file, string $remote_file, int $mode, int $resumepos = 0) Retrieves a file from the FTP server and writes it to a local file (non-blocking) + * @method int nb_put(string $remote_file, string $local_file, int $mode, int $startpos = 0) Stores a file on the FTP server (non-blocking) + * @method array nlist(string $directory) Returns a list of files in the given directory + * @method bool pasv(bool $pasv) Turns passive mode on or off + * @method bool put(string $remote_file, string $local_file, int $mode, int $startpos = 0) Uploads a file to the FTP server + * @method string pwd() Returns the current directory name + * @method bool quit() Closes an FTP connection + * @method array raw(string $command) Sends an arbitrary command to an FTP server + * @method array rawlist(string $directory, bool $recursive = false) Returns a detailed list of files in the given directory + * @method bool rename(string $oldname, string $newname) Renames a file or a directory on the FTP server + * @method bool rmdir(string $directory) Removes a directory + * @method bool set_option(int $option, mixed $value) Set miscellaneous runtime FTP options + * @method bool site(string $command) Sends a SITE command to the server + * @method int size(string $remote_file) Returns the size of the given file + * @method string systype() Returns the system type identifier of the remote FTP server * * @author Nicolas Tallefourtane */