xref: /PHP-8.0/ext/ftp/ftp.stub.php (revision 4b3206d6)
1<?php
2
3/** @generate-function-entries */
4
5/** @return resource|false */
6function ftp_connect(string $hostname, int $port = 21, int $timeout = 90) {}
7
8#ifdef HAVE_FTP_SSL
9/** @return resource|false */
10function ftp_ssl_connect(string $hostname, int $port = 21, int $timeout = 90) {}
11#endif
12
13/** @param resource $ftp */
14function ftp_login($ftp, string $username, string $password): bool {}
15
16/** @param resource $ftp */
17function ftp_pwd($ftp): string|false {}
18
19/** @param resource $ftp */
20function ftp_cdup($ftp): bool {}
21
22/** @param resource $ftp */
23function ftp_chdir($ftp, string $directory): bool {}
24
25/** @param resource $ftp */
26function ftp_exec($ftp, string $command): bool {}
27
28/** @param resource $ftp */
29function ftp_raw($ftp, string $command): ?array {}
30
31/** @param resource $ftp */
32function ftp_mkdir($ftp, string $directory): string|false {}
33
34/** @param resource $ftp */
35function ftp_rmdir($ftp, string $directory): bool {}
36
37/** @param resource $ftp */
38function ftp_chmod($ftp, int $permissions, string $filename): int|false {}
39
40/**
41 * @param resource $ftp
42 * @param string $response
43 */
44function ftp_alloc($ftp, int $size, &$response = null): bool {}
45
46/** @param resource $ftp */
47function ftp_nlist($ftp, string $directory): array|false {}
48
49/** @param resource $ftp */
50function ftp_rawlist($ftp, string $directory, bool $recursive = false): array|false {}
51
52/** @param resource $ftp */
53function ftp_mlsd($ftp, string $directory): array|false {}
54
55/** @param resource $ftp */
56function ftp_systype($ftp): string|false {}
57
58/**
59 * @param resource $ftp
60 * @param resource $stream
61 */
62function ftp_fget($ftp, $stream, string $remote_filename, int $mode = FTP_BINARY, int $offset = 0): bool {}
63
64/**
65 * @param resource $ftp
66 * @param resource $stream
67 */
68function ftp_nb_fget($ftp, $stream, string $remote_filename, int $mode = FTP_BINARY, int $offset = 0): int {}
69
70/** @param resource $ftp */
71function ftp_pasv($ftp, bool $enable): bool {}
72
73/** @param resource $ftp */
74function ftp_get($ftp, string $local_filename, string $remote_filename, int $mode = FTP_BINARY, int $offset = 0): bool {}
75
76/** @param resource $ftp */
77function ftp_nb_get($ftp, string $local_filename, string $remote_filename, int $mode = FTP_BINARY, int $offset = 0): int {}
78
79/** @param resource $ftp */
80function ftp_nb_continue($ftp): int {}
81
82/**
83 * @param resource $ftp
84 * @param resource $stream
85 */
86function ftp_fput($ftp, string $remote_filename, $stream, int $mode = FTP_BINARY, int $offset = 0): bool {}
87
88/**
89 * @param resource $ftp
90 * @param resource $stream
91 */
92function ftp_nb_fput($ftp, string $remote_filename, $stream, int $mode = FTP_BINARY, int $offset = 0): int {}
93
94/** @param resource $ftp */
95function ftp_put($ftp, string $remote_filename, string $local_filename, int $mode = FTP_BINARY, int $offset = 0): bool {}
96
97/** @param resource $ftp */
98function ftp_append($ftp, string $remote_filename, string $local_filename, int $mode = FTP_BINARY): bool {}
99
100/** @param resource $ftp */
101function ftp_nb_put($ftp, string $remote_filename, string $local_filename, int $mode = FTP_BINARY, int $offset = 0): int|false {}
102
103/** @param resource $ftp */
104function ftp_size($ftp, string $filename): int {}
105
106/** @param resource $ftp */
107function ftp_mdtm($ftp, string $filename): int {}
108
109/** @param resource $ftp */
110function ftp_rename($ftp, string $from, string $to): bool {}
111
112/** @param resource $ftp */
113function ftp_delete($ftp, string $filename): bool {}
114
115/** @param resource $ftp */
116function ftp_site($ftp, string $command): bool {}
117
118/** @param resource $ftp */
119function ftp_close($ftp): bool {}
120
121/**
122 * @param resource $ftp
123 * @alias ftp_close
124 */
125function ftp_quit($ftp): bool {}
126
127/**
128 * @param resource $ftp
129 * @param int|bool $value
130 */
131function ftp_set_option($ftp, int $option, $value): bool {}
132
133/** @param resource $ftp */
134function ftp_get_option($ftp, int $option): int|bool {}
135