wp/wp-admin/includes/class-wp-filesystem-ssh2.php
changeset 18 be944660c56a
parent 16 a86126ab1dd4
child 19 3d72ae0968f4
equal deleted inserted replaced
17:34716fd837a4 18:be944660c56a
   669 	/**
   669 	/**
   670 	 * Creates a directory.
   670 	 * Creates a directory.
   671 	 *
   671 	 *
   672 	 * @since 2.7.0
   672 	 * @since 2.7.0
   673 	 *
   673 	 *
   674 	 * @param string     $path  Path for new directory.
   674 	 * @param string           $path  Path for new directory.
   675 	 * @param int|false  $chmod Optional. The permissions as octal number (or false to skip chmod).
   675 	 * @param int|false        $chmod Optional. The permissions as octal number (or false to skip chmod).
   676 	 *                          Default false.
   676 	 *                                Default false.
   677 	 * @param string|int $chown Optional. A user name or number (or false to skip chown).
   677 	 * @param string|int|false $chown Optional. A user name or number (or false to skip chown).
   678 	 *                          Default false.
   678 	 *                                Default false.
   679 	 * @param string|int $chgrp Optional. A group name or number (or false to skip chgrp).
   679 	 * @param string|int|false $chgrp Optional. A group name or number (or false to skip chgrp).
   680 	 *                          Default false.
   680 	 *                                Default false.
   681 	 * @return bool True on success, false on failure.
   681 	 * @return bool True on success, false on failure.
   682 	 */
   682 	 */
   683 	public function mkdir( $path, $chmod = false, $chown = false, $chgrp = false ) {
   683 	public function mkdir( $path, $chmod = false, $chown = false, $chgrp = false ) {
   684 		$path = untrailingslashit( $path );
   684 		$path = untrailingslashit( $path );
   685 
   685 
   777 
   777 
   778 			if ( ! $include_hidden && '.' === $struc['name'][0] ) {
   778 			if ( ! $include_hidden && '.' === $struc['name'][0] ) {
   779 				continue;
   779 				continue;
   780 			}
   780 			}
   781 
   781 
   782 			if ( $limit_file && $struc['name'] != $limit_file ) {
   782 			if ( $limit_file && $struc['name'] !== $limit_file ) {
   783 				continue;
   783 				continue;
   784 			}
   784 			}
   785 
   785 
   786 			$struc['perms']       = $this->gethchmod( $path . '/' . $entry );
   786 			$struc['perms']       = $this->gethchmod( $path . '/' . $entry );
   787 			$struc['permsn']      = $this->getnumchmodfromh( $struc['perms'] );
   787 			$struc['permsn']      = $this->getnumchmodfromh( $struc['perms'] );