ftp.php 3.9 KB

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