Changeset 53872
- Timestamp:
- 08/09/2022 11:32:01 AM (2 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
r53014 r53872 664 664 * @abstract 665 665 * 666 * @param string $ filePath to file or directory.667 * @return bool Whether $ fileexists or not.668 */ 669 public function exists( $ file) {666 * @param string $path Path to file or directory. 667 * @return bool Whether $path exists or not. 668 */ 669 public function exists( $path ) { 670 670 return false; 671 671 } … … 716 716 * @abstract 717 717 * 718 * @param string $ filePath to file or directory.719 * @return bool Whether $ fileis writable.720 */ 721 public function is_writable( $ file) {718 * @param string $path Path to file or directory. 719 * @return bool Whether $path is writable. 720 */ 721 public function is_writable( $path ) { 722 722 return false; 723 723 } -
trunk/src/wp-admin/includes/class-wp-filesystem-direct.php
r52332 r53872 400 400 * @since 2.5.0 401 401 * 402 * @param string $ filePath to file or directory.403 * @return bool Whether $ fileexists or not.404 */ 405 public function exists( $ file) {406 return @file_exists( $ file);402 * @param string $path Path to file or directory. 403 * @return bool Whether $path exists or not. 404 */ 405 public function exists( $path ) { 406 return @file_exists( $path ); 407 407 } 408 408 … … 448 448 * @since 2.5.0 449 449 * 450 * @param string $ filePath to file or directory.451 * @return bool Whether $ fileis writable.452 */ 453 public function is_writable( $ file) {454 return @is_writable( $ file);450 * @param string $path Path to file or directory. 451 * @return bool Whether $path is writable. 452 */ 453 public function is_writable( $path ) { 454 return @is_writable( $path ); 455 455 } 456 456 -
trunk/src/wp-admin/includes/class-wp-filesystem-ftpext.php
r53862 r53872 416 416 * and ftp_rawlist() to check for file existence. 417 417 * 418 * @param string $ filePath to file or directory.419 * @return bool Whether $ fileexists or not.420 */ 421 public function exists( $ file) {422 if ( $this->is_dir( $ file) ) {418 * @param string $path Path to file or directory. 419 * @return bool Whether $path exists or not. 420 */ 421 public function exists( $path ) { 422 if ( $this->is_dir( $path ) ) { 423 423 return true; 424 424 } 425 425 426 return ! empty( ftp_rawlist( $this->link, $ file) );426 return ! empty( ftp_rawlist( $this->link, $path ) ); 427 427 } 428 428 … … 476 476 * @since 2.5.0 477 477 * 478 * @param string $ filePath to file or directory.479 * @return bool Whether $ fileis writable.480 */ 481 public function is_writable( $ file) {478 * @param string $path Path to file or directory. 479 * @return bool Whether $path is writable. 480 */ 481 public function is_writable( $path ) { 482 482 return true; 483 483 } -
trunk/src/wp-admin/includes/class-wp-filesystem-ftpsockets.php
r53862 r53872 418 418 * and file size to check for file existence. 419 419 * 420 * @param string $ filePath to file or directory.421 * @return bool Whether $ fileexists or not.422 */ 423 public function exists( $ file) {424 if ( $this->is_dir( $ file) ) {420 * @param string $path Path to file or directory. 421 * @return bool Whether $path exists or not. 422 */ 423 public function exists( $path ) { 424 if ( $this->is_dir( $path ) ) { 425 425 return true; 426 426 } 427 427 428 return is_numeric( $this->size( $ file) );428 return is_numeric( $this->size( $path ) ); 429 429 } 430 430 … … 485 485 * @since 2.5.0 486 486 * 487 * @param string $ filePath to file or directory.488 * @return bool Whether $ fileis writable.489 */ 490 public function is_writable( $ file) {487 * @param string $path Path to file or directory. 488 * @return bool Whether $path is writable. 489 */ 490 public function is_writable( $path ) { 491 491 return true; 492 492 } -
trunk/src/wp-admin/includes/class-wp-filesystem-ssh2.php
r52807 r53872 558 558 * @since 2.7.0 559 559 * 560 * @param string $ filePath to file or directory.561 * @return bool Whether $ fileexists or not.562 */ 563 public function exists( $ file) {564 return file_exists( $this->sftp_path( $ file) );560 * @param string $path Path to file or directory. 561 * @return bool Whether $path exists or not. 562 */ 563 public function exists( $path ) { 564 return file_exists( $this->sftp_path( $path ) ); 565 565 } 566 566 … … 606 606 * @since 2.7.0 607 607 * 608 * @param string $ filePath to file or directory.609 * @return bool Whether $ fileis writable.610 */ 611 public function is_writable( $ file) {608 * @param string $path Path to file or directory. 609 * @return bool Whether $path is writable. 610 */ 611 public function is_writable( $path ) { 612 612 // PHP will base its writable checks on system_user === file_owner, not ssh_user === file_owner. 613 613 return true;
Note: See TracChangeset
for help on using the changeset viewer.