in ftp/ftp.php [93:308]
function ftp_login(#[LanguageLevelTypeAware(['8.1' => 'FTP\Connection'], default: 'resource')] $ftp, string $username, string $password): bool {}
/**
* Returns the current directory name
* @link https://php.net/manual/en/function.ftp-pwd.php
* @param resource $ftp <p>
* The link identifier of the FTP connection.
* </p>
* @return string|false the current directory name or <b>FALSE</b> on error.
*/
function ftp_pwd(#[LanguageLevelTypeAware(['8.1' => 'FTP\Connection'], default: 'resource')] $ftp): string|false {}
/**
* Changes to the parent directory
* @link https://php.net/manual/en/function.ftp-cdup.php
* @param resource $ftp <p>
* The link identifier of the FTP connection.
* </p>
* @return bool <b>TRUE</b> on success or <b>FALSE</b> on failure.
*/
function ftp_cdup(#[LanguageLevelTypeAware(['8.1' => 'FTP\Connection'], default: 'resource')] $ftp): bool {}
/**
* Changes the current directory on a FTP server
* @link https://php.net/manual/en/function.ftp-chdir.php
* @param resource $ftp <p>
* The link identifier of the FTP connection.
* </p>
* @param string $directory <p>
* The target directory.
* </p>
* @return bool <b>TRUE</b> on success or <b>FALSE</b> on failure.
* If changing directory fails, PHP will also throw a warning.
*/
function ftp_chdir(#[LanguageLevelTypeAware(['8.1' => 'FTP\Connection'], default: 'resource')] $ftp, string $directory): bool {}
/**
* Requests execution of a command on the FTP server
* @link https://php.net/manual/en/function.ftp-exec.php
* @param resource $ftp <p>
* The link identifier of the FTP connection.
* </p>
* @param string $command <p>
* The command to execute.
* </p>
* @return bool <b>TRUE</b> if the command was successful (server sent response code:
* 200); otherwise returns <b>FALSE</b>.
*/
function ftp_exec(#[LanguageLevelTypeAware(['8.1' => 'FTP\Connection'], default: 'resource')] $ftp, string $command): bool {}
/**
* Sends an arbitrary command to an FTP server
* @link https://php.net/manual/en/function.ftp-raw.php
* @param resource $ftp <p>
* The link identifier of the FTP connection.
* </p>
* @param string $command <p>
* The command to execute.
* </p>
* @return string[] the server's response as an array of strings.
* No parsing is performed on the response string, nor does
* <b>ftp_raw</b> determine if the command succeeded.
*/
#[LanguageLevelTypeAware(['8.0' => 'array|null'], default: 'array')]
function ftp_raw(#[LanguageLevelTypeAware(['8.1' => 'FTP\Connection'], default: 'resource')] $ftp, string $command) {}
/**
* Creates a directory
* @link https://php.net/manual/en/function.ftp-mkdir.php
* @param resource $ftp <p>
* The link identifier of the FTP connection.
* </p>
* @param string $directory <p>
* The name of the directory that will be created.
* </p>
* @return string|false the newly created directory name on success or <b>FALSE</b> on error.
*/
function ftp_mkdir(#[LanguageLevelTypeAware(['8.1' => 'FTP\Connection'], default: 'resource')] $ftp, string $directory): string|false {}
/**
* Removes a directory
* @link https://php.net/manual/en/function.ftp-rmdir.php
* @param resource $ftp <p>
* The link identifier of the FTP connection.
* </p>
* @param string $directory <p>
* The directory to delete. This must be either an absolute or relative
* path to an empty directory.
* </p>
* @return bool <b>TRUE</b> on success or <b>FALSE</b> on failure.
*/
function ftp_rmdir(#[LanguageLevelTypeAware(['8.1' => 'FTP\Connection'], default: 'resource')] $ftp, string $directory): bool {}
/**
* Set permissions on a file via FTP
* @link https://php.net/manual/en/function.ftp-chmod.php
* @param resource $ftp <p>
* The link identifier of the FTP connection.
* </p>
* @param int $permissions <p>
* The new permissions, given as an octal value.
* </p>
* @param string $filename <p>
* The remote file.
* </p>
* @return int|false the new file permissions on success or <b>FALSE</b> on error.
*/
function ftp_chmod(#[LanguageLevelTypeAware(['8.1' => 'FTP\Connection'], default: 'resource')] $ftp, int $permissions, string $filename): int|false {}
/**
* Allocates space for a file to be uploaded
* @link https://php.net/manual/en/function.ftp-alloc.php
* @param resource $ftp <p>
* The link identifier of the FTP connection.
* </p>
* @param int $size <p>
* The number of bytes to allocate.
* </p>
* @param string &$response [optional] <p>
* A textual representation of the servers response will be returned by
* reference in <i>result</i> if a variable is provided.
* </p>
* @return bool <b>TRUE</b> on success or <b>FALSE</b> on failure.
*/
function ftp_alloc(#[LanguageLevelTypeAware(['8.1' => 'FTP\Connection'], default: 'resource')] $ftp, int $size, &$response): bool {}
/**
* Returns a list of files in the given directory
* @link https://php.net/manual/en/function.ftp-nlist.php
* @param resource $ftp <p>
* The link identifier of the FTP connection.
* </p>
* @param string $directory <p>
* The directory to be listed. This parameter can also include arguments, eg.
* ftp_nlist($conn_id, "-la /your/dir");
* Note that this parameter isn't escaped so there may be some issues with
* filenames containing spaces and other characters.
* </p>
* @return string[]|false an array of filenames from the specified directory on success or
* <b>FALSE</b> on error.
*/
function ftp_nlist(#[LanguageLevelTypeAware(['8.1' => 'FTP\Connection'], default: 'resource')] $ftp, string $directory): array|false {}
/**
* Returns a detailed list of files in the given directory
* @link https://php.net/manual/en/function.ftp-rawlist.php
* @param resource $ftp <p>
* The link identifier of the FTP connection.
* </p>
* @param string $directory <p>
* The directory path. May include arguments for the LIST
* command.
* </p>
* @param bool $recursive [optional] <p>
* If set to <b>TRUE</b>, the issued command will be LIST -R.
* </p>
* @return string[]|false an array where each element corresponds to one line of text.
* <p>
* The output is not parsed in any way. The system type identifier returned by
* <b>ftp_systype</b> can be used to determine how the results
* should be interpreted.
* </p>
*/
function ftp_rawlist(#[LanguageLevelTypeAware(['8.1' => 'FTP\Connection'], default: 'resource')] $ftp, string $directory, bool $recursive = false): array|false {}
/**
* Returns the system type identifier of the remote FTP server
* @link https://php.net/manual/en/function.ftp-systype.php
* @param resource $ftp <p>
* The link identifier of the FTP connection.
* </p>
* @return string|false the remote system type, or <b>FALSE</b> on error.
*/
function ftp_systype(#[LanguageLevelTypeAware(['8.1' => 'FTP\Connection'], default: 'resource')] $ftp): string|false {}
/**
* Turns passive mode on or off
* @link https://php.net/manual/en/function.ftp-pasv.php
* @param resource $ftp <p>
* The link identifier of the FTP connection.
* </p>
* @param bool $enable <p>
* If <b>TRUE</b>, the passive mode is turned on, else it's turned off.
* </p>
* @return bool <b>TRUE</b> on success or <b>FALSE</b> on failure.
*/
function ftp_pasv(#[LanguageLevelTypeAware(['8.1' => 'FTP\Connection'], default: 'resource')] $ftp, bool $enable): bool {}
/**
* Downloads a file from the FTP server
* @link https://php.net/manual/en/function.ftp-get.php
* @param resource $ftp <p>
* The link identifier of the FTP connection.
* </p>
* @param string $local_filename <p>
* The local file path (will be overwritten if the file already exists).
* </p>
* @param string $remote_filename <p>
* The remote file path.
* </p>
* @param int $mode <p>
* The transfer mode. Must be either <b>FTP_ASCII</b> or <b>FTP_BINARY</b>. Optional since PHP 7.3
* </p>
* @param int $offset [optional] <p>
* The position in the remote file to start downloading from.
* </p>
* @return bool <b>TRUE</b> on success or <b>FALSE</b> on failure.
*/
function ftp_get(
#[LanguageLevelTypeAware(['8.1' => 'FTP\Connection'], default: 'resource')] $ftp,
string $local_filename,
string $remote_filename,
#[EV([FTP_ASCII, FTP_BINARY])] #[PhpStormStubsElementAvailable(from: '5.3', to: '7.2')] int $mode,
#[EV([FTP_ASCII, FTP_BINARY])] #[PhpStormStubsElementAvailable(from: '7.3')] int $mode = FTP_BINARY,
int $offset = 0
): bool {}