žežulička', '/home/l3l3', 'C:\Ftp'))) { return true; } global $createdDirectory; if ($createdDirectory && $createdDirectory === $dirname) { return true; } trigger_error(sprintf('%s: No such file or directory', $dirname), E_USER_WARNING); return false; } function ftp_mkdir($connection, $dirname) { if (in_array($dirname, array('/home/l3l0/new'))) { global $createdDirectory; $createdDirectory = $dirname; return true; } return false; } function ftp_connect($host, $port = 21, $timeout = 90) { if ('localhost' !== $host) { return false; } return fopen('php://temp', 'r'); } function ftp_close($connection) { return fclose($connection); } function ftp_rawlist($connection, $directory, $recursive = false) { $arguments = explode(' ', $directory, 2); if ('/home/l3l0' === end($arguments)) { return array( "drwxr-x--- 15 vincent vincent 4096 Nov 3 21:31 .", "drwxr-x--- 15 vincent vincent 4096 Nov 3 21:31 ..", "drwxr-x--- 15 vincent vincent 4096 Nov 3 21:31 aaa", "-rwxr-x--- 15 vincent vincent 4096 Nov 3 21:31 filename", "-rwxr-x--- 15 vincent vincent 4096 Nov 3 21:31 filename.exe", "-rwxr-x--- 15 vincent vincent 4096 Nov 3 21:31 .htaccess", "lrwxrwxrwx 1 vincent vincent 11 Jul 12 12:16 www -> aaa", "lrwxrwxrwx 1 vincent vincent 11 Jul 12 12:16 vendor -> bbb", ); } if ('/home/l3l0/aaa' === end($arguments)) { return array( "-rwxr-x--- 15 vincent vincent 4096 Nov 3 21:31 filename", ); } if ('/home/l3l0/relative' === end($arguments)) { return array( "-rwxr-x--- 15 vincent vincent 4096 Nov 3 21:31 filename", "-rwxr-x--- 15 vincent vincent 4096 Nov 3 21:31 some", ); } if ('/home/l3l0/relative/some' === end($arguments)) { return array( "-rwxr-x--- 15 vincent vincent 4096 Nov 3 21:31 otherfilename", ); } if ('/home/l3l1' === end($arguments) && 0 === strpos(reset($arguments), '-al')) { return array( "drwxr-x--- 15 vincent vincent 4096 Nov 3 21:31 .", "drwxr-x--- 15 vincent vincent 4096 Nov 3 21:31 ..", "-rwxr-x--- 15 vincent vincent 4096 Nov 3 21:31 filename", "-rwxr-x--- 15 vincent vincent 4096 Nov 3 21:31 .htaccess", ); } if ('/home/l3l1' === end($arguments) && false === strpos(reset($arguments), '-al')) { return array( "drwxr-x--- 15 vincent vincent 4096 Nov 3 21:31 .", "drwxr-x--- 15 vincent vincent 4096 Nov 3 21:31 ..", "-rwxr-x--- 15 vincent vincent 4096 Nov 3 21:31 filename", ); } if ('/home/l3l2' === end($arguments)) { return array( "drwxr-x--- 15 vincent vincent 4096 Nov 3 21:31 .", "drwxr-x--- 15 vincent vincent 4096 Nov 3 21:31 ..", "drwxr-x--- 15 vincent vincent 4096 Nov 3 21:31 a b c d -> žežulička", "-rwxr-x--- 15 vincent vincent 4096 Nov 3 21:31 Žľuťoučký kůň.pdf", ); } if ('/home/l3l2/a b c d -> žežulička' === end($arguments)) { return array( "drwxr-x--- 15 vincent vincent 4096 Nov 3 21:31 .", "drwxr-x--- 15 vincent vincent 4096 Nov 3 21:31 ..", "-rwxr-x--- 15 vincent vincent 4096 Nov 3 21:31 do re mi.pdf", ); } if ('/home/l3l3' === end($arguments) && '-alR' === reset($arguments)) { return array( "/home/l3l3:", "total: 12", "drwxr-x--- 15 vincent vincent 4096 Nov 3 21:31 .", "drwxr-x--- 15 vincent vincent 4096 Nov 3 21:31 ..", "drwxr-x--- 15 vincent vincent 4096 Nov 3 21:31 aaa", "-rwxr-x--- 15 vincent vincent 4096 Nov 3 21:31 filename", "-rwxr-x--- 15 vincent vincent 4096 Nov 3 21:31 filename.exe", "-rwxr-x--- 15 vincent vincent 4096 Nov 3 21:31 .htaccess", "drwxrwxrwx 1 vincent vincent 11 Jul 12 12:16 www", "lrwxrwxrwx 1 vincent vincent 11 Jul 12 12:16 vendor -> bbb", "", "/home/l3l3/aaa:", "total: 8", "-rwxr-x--- 15 vincent vincent 4096 Nov 3 21:31 filename", "", "/home/l3l3/www:", "drwxr-x--- 15 vincent vincent 4096 Nov 3 21:31 .", "drwxr-x--- 15 vincent vincent 4096 Nov 3 21:31 ..", "-rwxr-x--- 15 vincent vincent 4096 Nov 3 21:31 filename", "drwxr-x--- 15 vincent vincent 4096 Nov 3 21:31 some", "", "/home/l3l3/www/some:", "total 5", "drwxr-x--- 15 vincent vincent 4096 Nov 3 21:31 .", "drwxr-x--- 15 vincent vincent 4096 Nov 3 21:31 ..", "-rwxr-x--- 15 vincent vincent 4096 Nov 3 21:31 otherfilename", ); } // https://github.com/KnpLabs/Gaufrette/issues/147 if ('C:\Ftp' === end($arguments)) { return array( "05-26-12 08:03PM