- Timestamp:
- 12/01/2014 12:12:05 AM (10 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/wp-admin/includes/class-wp-filesystem-direct.php
r29206 r30678 201 201 } 202 202 203 /** 204 * @param string $file 205 * @return string 206 */ 203 207 public function group($file) { 204 208 $gid = @filegroup($file); … … 211 215 } 212 216 217 /** 218 * @param string $source 219 * @param string $destination 220 * @param bool $overwrite 221 * @param int $mode 222 * @return bool 223 */ 213 224 public function copy($source, $destination, $overwrite = false, $mode = false) { 214 225 if ( ! $overwrite && $this->exists($destination) ) … … 221 232 } 222 233 234 /** 235 * @param string $source 236 * @param string $destination 237 * @param bool $overwrite 238 * @return bool 239 */ 223 240 public function move($source, $destination, $overwrite = false) { 224 241 if ( ! $overwrite && $this->exists($destination) ) … … 237 254 } 238 255 256 /** 257 * @param string $file 258 * @param bool $recursive 259 * @param string $type 260 * @return bool 261 */ 239 262 public function delete($file, $recursive = false, $type = false) { 240 263 if ( empty( $file ) ) // Some filesystems report this as /, which can cause non-expected recursive deletion of all files in the filesystem. … … 264 287 return $retval; 265 288 } 266 289 /** 290 * @param string $file 291 * @return bool 292 */ 267 293 public function exists($file) { 268 294 return @file_exists($file); 269 295 } 270 296 /** 297 * @param string $file 298 * @return bool 299 */ 271 300 public function is_file($file) { 272 301 return @is_file($file); 273 302 } 274 303 /** 304 * @param string $path 305 * @return bool 306 */ 275 307 public function is_dir($path) { 276 308 return @is_dir($path); 277 309 } 278 310 311 /** 312 * @param string $file 313 * @return bool 314 */ 279 315 public function is_readable($file) { 280 316 return @is_readable($file); 281 317 } 282 318 319 /** 320 * @param string $file 321 * @return bool 322 */ 283 323 public function is_writable($file) { 284 324 return @is_writable($file); 285 325 } 286 326 327 /** 328 * @param string $file 329 * @return int 330 */ 287 331 public function atime($file) { 288 332 return @fileatime($file); 289 333 } 290 334 335 /** 336 * @param string $file 337 * @return int 338 */ 291 339 public function mtime($file) { 292 340 return @filemtime($file); 293 341 } 294 342 343 /** 344 * @param string $file 345 * @return int 346 */ 295 347 public function size($file) { 296 348 return @filesize($file); 297 349 } 298 350 351 /** 352 * @param string $file 353 * @param int $time 354 * @param int $atime 355 * @return bool 356 */ 299 357 public function touch($file, $time = 0, $atime = 0) { 300 358 if ($time == 0) … … 305 363 } 306 364 365 /** 366 * @param string $path 367 * @param mixed $chmod 368 * @param mixed $chown 369 * @param mixed $chgrp 370 * @return bool 371 */ 307 372 public function mkdir($path, $chmod = false, $chown = false, $chgrp = false) { 308 373 // Safe mode fails with a trailing slash under certain PHP versions. … … 324 389 } 325 390 391 /** 392 * @param string $path 393 * @param bool $recursive 394 * @return type 395 */ 326 396 public function rmdir($path, $recursive = false) { 327 397 return $this->delete($path, $recursive); 328 398 } 329 399 400 /** 401 * @param string $path 402 * @param bool $include_hidden 403 * @param bool $recursive 404 * @return bool|array 405 */ 330 406 public function dirlist($path, $include_hidden = true, $recursive = false) { 331 407 if ( $this->is_file($path) ) {
Note: See TracChangeset
for help on using the changeset viewer.