Deployment\Deployer::deletePaths PHP Метод

deletePaths() приватный Метод

Deletes files and directories.
private deletePaths ( array $paths ) : void
$paths array
Результат void
    private function deletePaths(array $paths)
    {
        rsort($paths);
        foreach ($paths as $num => $path) {
            $remotePath = $this->remoteDir . $path;
            $this->writeProgress($num + 1, count($paths), "Deleting {$path}", NULL, 'maroon');
            try {
                if (substr($path, -1) === '/') {
                    // is directory?
                    $this->server->removeDir($remotePath);
                } else {
                    $this->server->removeFile($remotePath);
                }
            } catch (ServerException $e) {
                $this->logger->log("Unable to delete {$remotePath}", 'red');
            }
        }
    }