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