Changeset 30678
- Timestamp:
- 12/01/2014 12:12:05 AM (10 years ago)
- Location:
- trunk/src/wp-admin/includes
- Files:
-
- 5 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/wp-admin/includes/class-wp-filesystem-base.php
r29454 r30678 470 470 * 471 471 * @since 2.5.0 472 * 472 * @abstract 473 473 * @return bool True on success or false on failure (always true for WP_Filesystem_Direct). 474 474 */ … … 481 481 * 482 482 * @since 2.5.0 483 * 483 * @abstract 484 484 * @param string $file Name of the file to read. 485 * @return string|bool Returns the read data or false on failure.485 * @return mixed|bool Returns the read data or false on failure. 486 486 */ 487 487 public function get_contents( $file ) { … … 493 493 * 494 494 * @since 2.5.0 495 * 495 * @abstract 496 496 * @param string $file Path to the file. 497 497 * @return array|bool the file contents in an array or false on failure. … … 505 505 * 506 506 * @since 2.5.0 507 * 507 * @abstract 508 508 * @param string $file Remote path to the file where to write the data. 509 509 * @param string $contents The data to write. … … 519 519 * 520 520 * @since 2.5.0 521 * 521 * @abstract 522 522 * @return string|bool The current working directory on success, or false on failure. 523 523 */ … … 530 530 * 531 531 * @since 2.5.0 532 * 532 * @abstract 533 533 * @param string $dir The new current directory. 534 534 * @return bool Returns true on success or false on failure. … … 542 542 * 543 543 * @since 2.5.0 544 * 544 * @abstract 545 545 * @param string $file Path to the file. 546 546 * @param mixed $group A group name or number. … … 556 556 * 557 557 * @since 2.5.0 558 * 558 * @abstract 559 559 * @param string $file Path to the file. 560 560 * @param int $mode Optional. The permissions as octal number, usually 0644 for files, 0755 for dirs. … … 570 570 * 571 571 * @since 2.5.0 572 * 572 * @abstract 573 573 * @param string $file Path to the file. 574 574 * @return string|bool Username of the user or false on error. … … 582 582 * 583 583 * @since 2.5.0 584 * 584 * @abstract 585 585 * @param string $file Path to the file. 586 586 * @return string|bool The group or false on error. … … 594 594 * 595 595 * @since 2.5.0 596 * 596 * @abstract 597 597 * @param string $source Path to the source file. 598 598 * @param string $destination Path to the destination file. … … 611 611 * 612 612 * @since 2.5.0 613 * 613 * @abstract 614 614 * @param string $source Path to the source file. 615 615 * @param string $destination Path to the destination file. … … 626 626 * 627 627 * @since 2.5.0 628 * 628 * @abstract 629 629 * @param string $file Path to the file. 630 630 * @param bool $recursive Optional. If set True changes file group recursively. Defaults to False. … … 642 642 * 643 643 * @since 2.5.0 644 * 644 * @abstract 645 645 * @param string $file Path to file/directory. 646 646 * @return bool Whether $file exists or not. … … 654 654 * 655 655 * @since 2.5.0 656 * 656 * @abstract 657 657 * @param string $file File path. 658 658 * @return bool Whether $file is a file. … … 666 666 * 667 667 * @since 2.5.0 668 * 668 * @abstract 669 669 * @param string $path Directory path. 670 670 * @return bool Whether $path is a directory. … … 678 678 * 679 679 * @since 2.5.0 680 * 680 * @abstract 681 681 * @param string $file Path to file. 682 682 * @return bool Whether $file is readable. … … 690 690 * 691 691 * @since 2.5.0 692 * 693 * @param string $path Path to file/directory. 692 * @abstract 694 693 * @return bool Whether $file is writable. 695 694 */ … … 702 701 * 703 702 * @since 2.5.0 704 * 703 * @abstract 705 704 * @param string $file Path to file. 706 * @return int Unix timestamp representing last access time.705 * @return int|bool Unix timestamp representing last access time. 707 706 */ 708 707 public function atime( $file ) { … … 714 713 * 715 714 * @since 2.5.0 716 * 715 * @abstract 717 716 * @param string $file Path to file. 718 * @return int Unix timestamp representing modification time.717 * @return int|bool Unix timestamp representing modification time. 719 718 */ 720 719 public function mtime( $file ) { … … 726 725 * 727 726 * @since 2.5.0 728 * 727 * @abstract 729 728 * @param string $file Path to file. 730 * @return int Size of the file in bytes.729 * @return int|bool Size of the file in bytes. 731 730 */ 732 731 public function size( $file ) { … … 740 739 * 741 740 * @since 2.5.0 742 * 741 * @abstract 743 742 * @param string $file Path to file. 744 743 * @param int $time Optional. Modified time to set for file. … … 756 755 * 757 756 * @since 2.5.0 758 * 757 * @abstract 759 758 * @param string $path Path for new directory. 760 759 * @param mixed $chmod Optional. The permissions as octal number, (or False to skip chmod) … … 774 773 * 775 774 * @since 2.5.0 776 * 775 * @abstract 777 776 * @param string $path Path to directory. 778 777 * @param bool $recursive Optional. Whether to recursively remove files/directories. … … 788 787 * 789 788 * @since 2.5.0 790 * 789 * @abstract 791 790 * @param string $path Path to directory or file. 792 791 * @param bool $include_hidden Optional. Whether to include details of hidden ("." prefixed) files. -
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) ) { -
trunk/src/wp-admin/includes/class-wp-filesystem-ftpext.php
r28489 r30678 88 88 } 89 89 90 /** 91 * @param string $file 92 * @return bool|string 93 */ 90 94 public function get_contents( $file ) { 91 95 $tempfile = wp_tempnam($file); … … 109 113 } 110 114 115 /** 116 * @param string $file 117 * @return array 118 */ 111 119 public function get_contents_array($file) { 112 120 return explode("\n", $this->get_contents($file)); 113 121 } 114 122 123 /** 124 * @param string $file 125 * @param string $contents 126 * @param bool|string $mode 127 * @return bool 128 */ 115 129 public function put_contents($file, $contents, $mode = false ) { 116 130 $tempfile = wp_tempnam($file); … … 144 158 } 145 159 160 /** 161 * @return string 162 */ 146 163 public function cwd() { 147 164 $cwd = @ftp_pwd($this->link); … … 151 168 } 152 169 170 /** 171 * @param string $dir 172 * @return bool 173 */ 153 174 public function chdir($dir) { 154 175 return @ftp_chdir($this->link, $dir); 155 176 } 156 177 178 /** 179 * @param string $file 180 * @param bool $group 181 * @param bool $recursive 182 */ 157 183 public function chgrp($file, $group, $recursive = false ) { 158 184 return false; 159 185 } 160 186 187 /** 188 * @param string $file 189 * @param int $mode 190 * @param bool $recursive 191 * @return bool 192 */ 161 193 public function chmod($file, $mode = false, $recursive = false) { 162 194 if ( ! $mode ) { … … 182 214 } 183 215 216 /** 217 * @param string $file 218 * @return string 219 */ 184 220 public function owner($file) { 185 221 $dir = $this->dirlist($file); 186 222 return $dir[$file]['owner']; 187 223 } 188 224 /** 225 * @param string $file 226 * @return string 227 */ 189 228 public function getchmod($file) { 190 229 $dir = $this->dirlist($file); 191 230 return $dir[$file]['permsn']; 192 231 } 193 232 /** 233 * @param string $file 234 * @return string 235 */ 194 236 public function group($file) { 195 237 $dir = $this->dirlist($file); … … 197 239 } 198 240 241 /** 242 * 243 * @param string $source 244 * @param string $destination 245 * @param bool $overwrite 246 * @param string|bool $mode 247 * @return bool 248 */ 199 249 public function copy($source, $destination, $overwrite = false, $mode = false) { 200 250 if ( ! $overwrite && $this->exists($destination) ) … … 205 255 return $this->put_contents($destination, $content, $mode); 206 256 } 207 257 /** 258 * @param string $source 259 * @param string $destination 260 * @param bool $overwrite 261 * @return bool 262 */ 208 263 public function move($source, $destination, $overwrite = false) { 209 264 return ftp_rename($this->link, $source, $destination); 210 265 } 211 266 /** 267 * @param string $file 268 * @param bool $recursive 269 * @param string $type 270 * @return bool 271 */ 212 272 public function delete($file, $recursive = false, $type = false) { 213 273 if ( empty($file) ) … … 224 284 return @ftp_rmdir($this->link, $file); 225 285 } 226 286 /** 287 * @param string $file 288 * @return bool 289 */ 227 290 public function exists($file) { 228 291 $list = @ftp_nlist($this->link, $file); 229 292 return !empty($list); //empty list = no file, so invert. 230 293 } 231 294 /** 295 * @param string $file 296 * @return bool 297 */ 232 298 public function is_file($file) { 233 299 return $this->exists($file) && !$this->is_dir($file); 234 300 } 235 301 /** 302 * @param string $path 303 * @return bool 304 */ 236 305 public function is_dir($path) { 237 306 $cwd = $this->cwd(); … … 244 313 } 245 314 315 /** 316 * @param string $file 317 * @return bool 318 */ 246 319 public function is_readable($file) { 247 320 return true; 248 321 } 249 322 /** 323 * @param string $file 324 * @return bool 325 */ 250 326 public function is_writable($file) { 251 327 return true; 252 328 } 253 329 /** 330 * @param string $file 331 * @return bool 332 */ 254 333 public function atime($file) { 255 334 return false; 256 335 } 257 336 /** 337 * @param string $file 338 * @return int 339 */ 258 340 public function mtime($file) { 259 341 return ftp_mdtm($this->link, $file); 260 342 } 261 343 /** 344 * @param string $file 345 * @return int 346 */ 262 347 public function size($file) { 263 348 return ftp_size($this->link, $file); 264 349 } 265 350 /** 351 * @param string $file 352 * @return bool 353 */ 266 354 public function touch($file, $time = 0, $atime = 0) { 267 355 return false; 268 356 } 269 357 358 /** 359 * @param string $path 360 * @param mixed $chmod 361 * @param mixed $chown 362 * @param mixed $chgrp 363 * @return bool 364 */ 270 365 public function mkdir($path, $chmod = false, $chown = false, $chgrp = false) { 271 366 $path = untrailingslashit($path); … … 283 378 } 284 379 380 /** 381 * @param string $path 382 * @param bool $recursive 383 * @return bool 384 */ 285 385 public function rmdir($path, $recursive = false) { 286 386 return $this->delete($path, $recursive); 287 387 } 288 388 389 /** 390 * @staticvar bool $is_windows 391 * @param string $line 392 * @return string 393 */ 289 394 public function parselisting($line) { 290 395 static $is_windows; … … 360 465 } 361 466 467 /** 468 * @param string $path 469 * @param bool $include_hidden 470 * @param bool $recursive 471 * @return bool|array 472 */ 362 473 public function dirlist($path = '.', $include_hidden = true, $recursive = false) { 363 474 if ( $this->is_file($path) ) { -
trunk/src/wp-admin/includes/class-wp-filesystem-ftpsockets.php
r29206 r30678 82 82 } 83 83 84 /** 85 * @param string $file 86 * @return bool|string 87 */ 84 88 public function get_contents( $file ) { 85 89 if ( ! $this->exists($file) ) … … 114 118 return $contents; 115 119 } 116 120 /** 121 * @param string $file 122 * @return array 123 */ 117 124 public function get_contents_array($file) { 118 125 return explode("\n", $this->get_contents($file) ); 119 126 } 120 127 128 /** 129 * @param string $file 130 * @param string $contents 131 * @param int|bool $mode 132 * @return bool 133 */ 121 134 public function put_contents($file, $contents, $mode = false ) { 122 135 $temp = wp_tempnam( $file ); … … 164 177 } 165 178 179 /** 180 * @param string $file 181 * @param bool $group 182 * @param bool $recursive 183 */ 166 184 public function chgrp($file, $group, $recursive = false ) { 167 185 return false; 168 186 } 169 187 188 /** 189 * @param string $file 190 * @param int|bool $mode 191 * @param bool $recursive 192 * @return bool 193 */ 170 194 public function chmod($file, $mode = false, $recursive = false ) { 171 195 if ( ! $mode ) { … … 189 213 } 190 214 215 /** 216 * @param string $file 217 * @return string 218 */ 191 219 public function owner($file) { 192 220 $dir = $this->dirlist($file); 193 221 return $dir[$file]['owner']; 194 222 } 195 223 /** 224 * @param string $file 225 * @return string 226 */ 196 227 public function getchmod($file) { 197 228 $dir = $this->dirlist($file); 198 229 return $dir[$file]['permsn']; 199 230 } 200 231 /** 232 * @param string $file 233 * @return string 234 */ 201 235 public function group($file) { 202 236 $dir = $this->dirlist($file); 203 237 return $dir[$file]['group']; 204 238 } 205 239 /** 240 * @param string $source 241 * @param string $destination 242 * @param bool $overwrite 243 * @param int|bool $mode 244 * @return bool 245 */ 206 246 public function copy($source, $destination, $overwrite = false, $mode = false) { 207 247 if ( ! $overwrite && $this->exists($destination) ) … … 214 254 return $this->put_contents($destination, $content, $mode); 215 255 } 216 256 /** 257 * @param string $source 258 * @param string $destination 259 * @param bool $overwrite 260 * @return bool 261 */ 217 262 public function move($source, $destination, $overwrite = false ) { 218 263 return $this->ftp->rename($source, $destination); 219 264 } 220 265 /** 266 * @param string $file 267 * @param bool $recursive 268 * @param string $type 269 * @return bool 270 */ 221 271 public function delete($file, $recursive = false, $type = false) { 222 272 if ( empty($file) ) … … 230 280 } 231 281 282 /** 283 * @param string $file 284 * @return bool 285 */ 232 286 public function exists( $file ) { 233 287 $list = $this->ftp->nlist( $file ); … … 236 290 } 237 291 292 /** 293 * @param string $file 294 * @return bool 295 */ 238 296 public function is_file($file) { 239 297 if ( $this->is_dir($file) ) … … 244 302 } 245 303 304 /** 305 * @param string $path 306 * @return bool 307 */ 246 308 public function is_dir($path) { 247 309 $cwd = $this->cwd(); … … 253 315 } 254 316 317 /** 318 * @param string $file 319 * @return bool 320 */ 255 321 public function is_readable($file) { 256 322 return true; 257 323 } 258 324 325 /** 326 * @param string $file 327 * @return bool 328 */ 259 329 public function is_writable($file) { 260 330 return true; 261 331 } 262 332 333 /** 334 * @param string $file 335 * @return bool 336 */ 263 337 public function atime($file) { 264 338 return false; 265 339 } 266 340 341 /** 342 * @param string $file 343 * @return int 344 */ 267 345 public function mtime($file) { 268 346 return $this->ftp->mdtm($file); 269 347 } 270 348 349 /** 350 * @param string $file 351 * @return int 352 */ 271 353 public function size($file) { 272 354 return $this->ftp->filesize($file); 273 355 } 274 356 /** 357 * @param string $file 358 * @param int $time 359 * @param int $atime 360 * @return bool 361 */ 275 362 public function touch($file, $time = 0, $atime = 0 ) { 276 363 return false; 277 364 } 278 365 366 /** 367 * @param string $path 368 * @param mixed $chmod 369 * @param mixed $chown 370 * @param mixed $chgrp 371 * @return bool 372 */ 279 373 public function mkdir($path, $chmod = false, $chown = false, $chgrp = false ) { 280 374 $path = untrailingslashit($path); … … 294 388 } 295 389 390 /** 391 * @param sting $path 392 * @param bool $recursive 393 */ 296 394 public function rmdir($path, $recursive = false ) { 297 395 $this->delete($path, $recursive); 298 396 } 299 397 398 /** 399 * @param string $path 400 * @param bool $include_hidden 401 * @param bool $recursive 402 * @return bool|array 403 */ 300 404 public function dirlist($path = '.', $include_hidden = true, $recursive = false ) { 301 405 if ( $this->is_file($path) ) { -
trunk/src/wp-admin/includes/class-wp-filesystem-ssh2.php
r29970 r30678 124 124 } 125 125 126 /** 127 * @param string $command 128 * @param bool $returnbool 129 */ 126 130 public function run_command( $command, $returnbool = false) { 127 131 … … 145 149 } 146 150 151 /** 152 * @param string $file 153 * @return string|false 154 */ 147 155 public function get_contents( $file ) { 148 156 $file = ltrim($file, '/'); … … 150 158 } 151 159 160 /** 161 * @param string $file 162 * @return array 163 */ 152 164 public function get_contents_array($file) { 153 165 $file = ltrim($file, '/'); … … 155 167 } 156 168 169 /** 170 * @param string $file 171 * @param string $contents 172 * @param int $mode 173 * @return bool 174 */ 157 175 public function put_contents($file, $contents, $mode = false ) { 158 176 $ret = file_put_contents( 'ssh2.sftp://' . $this->sftp_link . '/' . ltrim( $file, '/' ), $contents ); … … 173 191 } 174 192 193 /** 194 * @param string $dir 195 * @return bool 196 */ 175 197 public function chdir($dir) { 176 198 return $this->run_command('cd ' . $dir, true); 177 199 } 178 200 201 /** 202 * @param string $file 203 * @param bool $group 204 * @param bool $recursive 205 */ 179 206 public function chgrp($file, $group, $recursive = false ) { 180 207 if ( ! $this->exists($file) ) … … 185 212 } 186 213 214 /** 215 * @param string $file 216 * @param int $mode 217 * @param bool $recursive 218 * @return bool 219 */ 187 220 public function chmod($file, $mode = false, $recursive = false) { 188 221 if ( ! $this->exists($file) ) … … 209 242 * 210 243 * @param string $file Path to the file. 211 * @param mixed$owner A user name or number.212 * @param bool $recursive Optional. If set True changes file owner recursivly. Defaults to False.213 * @return bool Returns true on success or false on failure.244 * @param bool $owner A user name or number. 245 * @param bool $recursive Optional. If set True changes file owner recursivly. Defaults to False. 246 * @return bool|string Returns true on success or false on failure. 214 247 */ 215 248 public function chown( $file, $owner, $recursive = false ) { … … 221 254 } 222 255 256 /** 257 * @param string $file 258 * @return string|false 259 */ 223 260 public function owner($file) { 224 261 $owneruid = @fileowner('ssh2.sftp://' . $this->sftp_link . '/' . ltrim($file, '/')); … … 230 267 return $ownerarray['name']; 231 268 } 232 269 /** 270 * @param string $file 271 * @return string 272 */ 233 273 public function getchmod($file) { 234 274 return substr( decoct( @fileperms( 'ssh2.sftp://' . $this->sftp_link . '/' . ltrim( $file, '/' ) ) ), -3 ); 235 275 } 236 276 277 /** 278 * @param string $file 279 * @return string|false 280 */ 237 281 public function group($file) { 238 282 $gid = @filegroup('ssh2.sftp://' . $this->sftp_link . '/' . ltrim($file, '/')); … … 245 289 } 246 290 291 /** 292 * @param string $source 293 * @param string $destination 294 * @param bool $overwrite 295 * @param int|bool $mode 296 * @return bool 297 */ 247 298 public function copy($source, $destination, $overwrite = false, $mode = false) { 248 299 if ( ! $overwrite && $this->exists($destination) ) … … 254 305 } 255 306 307 /** 308 * @param string $source 309 * @param string $destination 310 * @param bool $overwrite 311 * @return bool 312 */ 256 313 public function move($source, $destination, $overwrite = false) { 257 314 return @ssh2_sftp_rename( $this->sftp_link, $source, $destination ); 258 315 } 259 316 317 /** 318 * @param string $file 319 * @param bool $recursive 320 * @param string|bool $type 321 * @return bool 322 */ 260 323 public function delete($file, $recursive = false, $type = false) { 261 324 if ( 'f' == $type || $this->is_file($file) ) … … 272 335 } 273 336 337 /** 338 * @param string $file 339 * @return bool 340 */ 274 341 public function exists($file) { 275 342 $file = ltrim($file, '/'); 276 343 return file_exists('ssh2.sftp://' . $this->sftp_link . '/' . $file); 277 344 } 278 345 /** 346 * @param string $file 347 * @return bool 348 */ 279 349 public function is_file($file) { 280 350 $file = ltrim($file, '/'); 281 351 return is_file('ssh2.sftp://' . $this->sftp_link . '/' . $file); 282 352 } 283 353 /** 354 * @param string $path 355 * @return bool 356 */ 284 357 public function is_dir($path) { 285 358 $path = ltrim($path, '/'); 286 359 return is_dir('ssh2.sftp://' . $this->sftp_link . '/' . $path); 287 360 } 288 361 /** 362 * @param string $file 363 * @return bool 364 */ 289 365 public function is_readable($file) { 290 366 $file = ltrim($file, '/'); 291 367 return is_readable('ssh2.sftp://' . $this->sftp_link . '/' . $file); 292 368 } 293 369 /** 370 * @param string $file 371 * @return bool 372 */ 294 373 public function is_writable($file) { 295 374 $file = ltrim($file, '/'); 296 375 return is_writable('ssh2.sftp://' . $this->sftp_link . '/' . $file); 297 376 } 298 377 /** 378 * @param string $file 379 * @return int 380 */ 299 381 public function atime($file) { 300 382 $file = ltrim($file, '/'); … … 302 384 } 303 385 386 /** 387 * @param string $file 388 * @return int 389 */ 304 390 public function mtime($file) { 305 391 $file = ltrim($file, '/'); … … 307 393 } 308 394 395 /** 396 * @param string $file 397 * @return int 398 */ 309 399 public function size($file) { 310 400 $file = ltrim($file, '/'); … … 312 402 } 313 403 404 /** 405 * @param string $file 406 * @param int $time 407 * @param int $atime 408 */ 314 409 public function touch($file, $time = 0, $atime = 0) { 315 410 //Not implemented. 316 411 } 317 412 413 /** 414 * @param string $path 415 * @param mixed $chmod 416 * @param mixed $chown 417 * @param mixed $chgrp 418 * @return bool 419 */ 318 420 public function mkdir($path, $chmod = false, $chown = false, $chgrp = false) { 319 421 $path = untrailingslashit($path); … … 332 434 } 333 435 436 /** 437 * @param string $path 438 * @param bool $recursive 439 * @return bool 440 */ 334 441 public function rmdir($path, $recursive = false) { 335 442 return $this->delete($path, $recursive); 336 443 } 337 444 445 /** 446 * @param string $path 447 * @param bool $include_hidden 448 * @param bool $recursive 449 * @return bool|array 450 */ 338 451 public function dirlist($path, $include_hidden = true, $recursive = false) { 339 452 if ( $this->is_file($path) ) {
Note: See TracChangeset
for help on using the changeset viewer.