|
| 1 | +<?php |
| 2 | + |
| 3 | +/** @generate-class-entries */ |
| 4 | + |
| 5 | +namespace FTP { |
| 6 | + |
| 7 | + /** |
| 8 | + * @strict-properties |
| 9 | + * @not-serializable |
| 10 | + */ |
| 11 | + final class Connection |
| 12 | + { |
| 13 | + } |
| 14 | + |
| 15 | +} |
| 16 | + |
| 17 | +namespace { |
| 18 | + |
| 19 | + function ftp_connect(string $hostname, int $port = 21, int $timeout = 90): FTP\Connection|resource|false {} |
| 20 | + |
| 21 | + #ifdef HAVE_FTP_SSL |
| 22 | + function ftp_ssl_connect(string $hostname, int $port = 21, int $timeout = 90): FTP\Connection|resource|false {} |
| 23 | + #endif |
| 24 | + |
| 25 | + function ftp_login(FTP\Connection|resource $ftp, string $username, string $password): bool {} |
| 26 | + function ftp_pwd(FTP\Connection|resource $ftp): string|false {} |
| 27 | + function ftp_cdup(FTP\Connection|resource $ftp): bool {} |
| 28 | + function ftp_chdir(FTP\Connection|resource $ftp, string $directory): bool {} |
| 29 | + function ftp_exec(FTP\Connection|resource $ftp, string $command): bool {} |
| 30 | + function ftp_raw(FTP\Connection|resource $ftp, string $command): ?array {} |
| 31 | + function ftp_mkdir(FTP\Connection|resource $ftp, string $directory): string|false {} |
| 32 | + function ftp_rmdir(FTP\Connection|resource $ftp, string $directory): bool {} |
| 33 | + function ftp_chmod(FTP\Connection|resource $ftp, int $permissions, string $filename): int|false {} |
| 34 | + |
| 35 | + /** @param string $response */ |
| 36 | + function ftp_alloc(FTP\Connection|resource $ftp, int $size, &$response = null): bool {} |
| 37 | + function ftp_nlist(FTP\Connection|resource $ftp, string $directory): array|false {} |
| 38 | + function ftp_rawlist(FTP\Connection|resource $ftp, string $directory, bool $recursive = false): array|false {} |
| 39 | + function ftp_mlsd(FTP\Connection|resource $ftp, string $directory): array|false {} |
| 40 | + function ftp_systype(FTP\Connection|resource $ftp): string|false {} |
| 41 | + |
| 42 | + /** @param resource $stream */ |
| 43 | + function ftp_fget(FTP\Connection|resource $ftp, $stream, string $remote_filename, int $mode = FTP_BINARY, int $offset = 0): bool {} |
| 44 | + |
| 45 | + /** @param resource $stream */ |
| 46 | + function ftp_nb_fget(FTP\Connection|resource $ftp, $stream, string $remote_filename, int $mode = FTP_BINARY, int $offset = 0): int {} |
| 47 | + function ftp_pasv(FTP\Connection|resource $ftp, bool $enable): bool {} |
| 48 | + function ftp_get(FTP\Connection|resource $ftp, string $local_filename, string $remote_filename, int $mode = FTP_BINARY, int $offset = 0): bool {} |
| 49 | + function ftp_nb_get(FTP\Connection|resource $ftp, string $local_filename, string $remote_filename, int $mode = FTP_BINARY, int $offset = 0): int {} |
| 50 | + function ftp_nb_continue(FTP\Connection|resource $ftp): int {} |
| 51 | + |
| 52 | + /** @param resource $stream */ |
| 53 | + function ftp_fput(FTP\Connection|resource $ftp, string $remote_filename, $stream, int $mode = FTP_BINARY, int $offset = 0): bool {} |
| 54 | + |
| 55 | + /** @param resource $stream */ |
| 56 | + function ftp_nb_fput(FTP\Connection|resource $ftp, string $remote_filename, $stream, int $mode = FTP_BINARY, int $offset = 0): int {} |
| 57 | + function ftp_put(FTP\Connection|resource $ftp, string $remote_filename, string $local_filename, int $mode = FTP_BINARY, int $offset = 0): bool {} |
| 58 | + function ftp_append(FTP\Connection|resource $ftp, string $remote_filename, string $local_filename, int $mode = FTP_BINARY): bool {} |
| 59 | + function ftp_nb_put(FTP\Connection|resource $ftp, string $remote_filename, string $local_filename, int $mode = FTP_BINARY, int $offset = 0): int|false {} |
| 60 | + function ftp_size(FTP\Connection|resource $ftp, string $filename): int {} |
| 61 | + function ftp_mdtm(FTP\Connection|resource $ftp, string $filename): int {} |
| 62 | + function ftp_rename(FTP\Connection|resource $ftp, string $from, string $to): bool {} |
| 63 | + function ftp_delete(FTP\Connection|resource $ftp, string $filename): bool {} |
| 64 | + function ftp_site(FTP\Connection|resource $ftp, string $command): bool {} |
| 65 | + function ftp_close(FTP\Connection|resource $ftp): bool {} |
| 66 | + |
| 67 | + /** @alias ftp_close */ |
| 68 | + function ftp_quit(FTP\Connection|resource $ftp): bool {} |
| 69 | + |
| 70 | + /** @param int|bool $value */ |
| 71 | + function ftp_set_option(FTP\Connection|resource $ftp, int $option, $value): bool {} |
| 72 | + function ftp_get_option(FTP\Connection|resource $ftp, int $option): int|bool {} |
| 73 | + |
| 74 | +} |
0 commit comments