- Timestamp:
- 05/29/2015 08:16:22 PM (9 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/wp-admin/includes/class-wp-filesystem-ftpsockets.php
r31815 r32654 21 21 public $ftp; 22 22 23 public function __construct($opt = '') { 23 /** 24 * 25 * @param array $opt 26 */ 27 public function __construct( $opt = '' ) { 24 28 $this->method = 'ftpsockets'; 25 29 $this->errors = new WP_Error(); … … 53 57 } 54 58 59 /** 60 * 61 * @return bool 62 */ 55 63 public function connect() { 56 64 if ( ! $this->ftp ) … … 227 235 } 228 236 /** 237 * @param string $source 238 * @param string $destination 239 * @param bool $overwrite 240 * @param int|bool $mode 241 * @return bool 242 */ 243 public function copy($source, $destination, $overwrite = false, $mode = false) { 244 if ( ! $overwrite && $this->exists($destination) ) 245 return false; 246 247 $content = $this->get_contents($source); 248 if ( false === $content ) 249 return false; 250 251 return $this->put_contents($destination, $content, $mode); 252 } 253 /** 229 254 * @param string $source 230 255 * @param string $destination 231 * @param bool $overwrite 232 * @param int|bool $mode 233 * @return bool 234 */ 235 public function copy($source, $destination, $overwrite = false, $mode = false) { 236 if ( ! $overwrite && $this->exists($destination) ) 237 return false; 238 239 $content = $this->get_contents($source); 240 if ( false === $content ) 241 return false; 242 243 return $this->put_contents($destination, $content, $mode); 244 } 245 /** 246 * @param string $source 247 * @param string $destination 248 * @param bool $overwrite 256 * @param bool $overwrite 249 257 * @return bool 250 258 */ … … 254 262 /** 255 263 * @param string $file 256 * @param bool $recursive264 * @param bool $recursive 257 265 * @param string $type 258 266 * @return bool … … 360 368 /** 361 369 * @param string $path 362 * @param mixed $chmod363 * @param mixed $chown364 * @param mixed $chgrp370 * @param mixed $chmod 371 * @param mixed $chown 372 * @param mixed $chgrp 365 373 * @return bool 366 374 */ … … 388 396 /** 389 397 * @param string $path 390 * @param bool $include_hidden391 * @param bool $recursive398 * @param bool $include_hidden 399 * @param bool $recursive 392 400 * @return bool|array 393 401 */
Note: See TracChangeset
for help on using the changeset viewer.