FTPInterface.php 5.7 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131
  1. <?php
  2. namespace ZN\Services;
  3. interface FTPInterface
  4. {
  5. //----------------------------------------------------------------------------------------------------
  6. //
  7. // Yazar : Ozan UYKUN <ozanbote@windowslive.com> | <ozanbote@gmail.com>
  8. // Site : www.zntr.net
  9. // Lisans : The MIT License
  10. // Telif Hakkı: Copyright (c) 2012-2016, zntr.net
  11. //
  12. //----------------------------------------------------------------------------------------------------
  13. //----------------------------------------------------------------------------------------------------
  14. // connect()
  15. //----------------------------------------------------------------------------------------------------
  16. //
  17. // @param array $config: empty
  18. //
  19. //----------------------------------------------------------------------------------------------------
  20. public function connect($con);
  21. //----------------------------------------------------------------------------------------------------
  22. // close()
  23. //----------------------------------------------------------------------------------------------------
  24. //
  25. // @param void
  26. //
  27. //----------------------------------------------------------------------------------------------------
  28. public function close();
  29. //----------------------------------------------------------------------------------------------------
  30. // createFolder()
  31. //----------------------------------------------------------------------------------------------------
  32. //
  33. // @param string $path: empty
  34. //
  35. //----------------------------------------------------------------------------------------------------
  36. public function createFolder($path);
  37. //----------------------------------------------------------------------------------------------------
  38. // deleteFolder()
  39. //----------------------------------------------------------------------------------------------------
  40. //
  41. // @param string $path: empty
  42. //
  43. //----------------------------------------------------------------------------------------------------
  44. public function deleteFolder($path);
  45. //----------------------------------------------------------------------------------------------------
  46. // changeFolder()
  47. //----------------------------------------------------------------------------------------------------
  48. //
  49. // @param string $path: empty
  50. //
  51. //----------------------------------------------------------------------------------------------------
  52. public function changeFolder($path);
  53. //----------------------------------------------------------------------------------------------------
  54. // rename()
  55. //----------------------------------------------------------------------------------------------------
  56. //
  57. // @param string $oldName: empty
  58. // @param string $newName: empty
  59. //
  60. //----------------------------------------------------------------------------------------------------
  61. public function rename($oldName, $newName);
  62. //----------------------------------------------------------------------------------------------------
  63. // deleteFile()
  64. //----------------------------------------------------------------------------------------------------
  65. //
  66. // @param string $path: empty
  67. //
  68. //----------------------------------------------------------------------------------------------------
  69. public function deleteFile($path);
  70. //----------------------------------------------------------------------------------------------------
  71. // upload()
  72. //----------------------------------------------------------------------------------------------------
  73. //
  74. // @param string $localPath : empty
  75. // @param string $remotePath: empty
  76. // @param string $type : binary, ascii
  77. //
  78. //----------------------------------------------------------------------------------------------------
  79. public function upload($localPath, $remotePath, $type);
  80. //----------------------------------------------------------------------------------------------------
  81. // dowload()
  82. //----------------------------------------------------------------------------------------------------
  83. //
  84. // @param string $remotePath: empty
  85. // @param string $localPath : empty
  86. // @param string $type : binary, ascii
  87. //
  88. //----------------------------------------------------------------------------------------------------
  89. public function download($remotePath, $localPath, $type);
  90. //----------------------------------------------------------------------------------------------------
  91. // permission()
  92. //----------------------------------------------------------------------------------------------------
  93. //
  94. // @param string $path: empty
  95. // @param int $type : 0755
  96. //
  97. //----------------------------------------------------------------------------------------------------
  98. public function permission($path, $type);
  99. //----------------------------------------------------------------------------------------------------
  100. // files()
  101. //----------------------------------------------------------------------------------------------------
  102. //
  103. // @param string $path : empty
  104. // @param string $extension: empty
  105. //
  106. //----------------------------------------------------------------------------------------------------
  107. public function files($path, $extension);
  108. //----------------------------------------------------------------------------------------------------
  109. // fileSize()
  110. //----------------------------------------------------------------------------------------------------
  111. //
  112. // @param string $path : empty
  113. // @param string $type : b, kb, mb, gb
  114. // @param int $decimal: 2
  115. //
  116. //----------------------------------------------------------------------------------------------------
  117. public function fileSize($path, $type, $decimal);
  118. }