ftp.php 3.9 KB

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