equal
deleted
inserted
replaced
208 // The FTP class uses string functions internally during file download/upload. |
208 // The FTP class uses string functions internally during file download/upload. |
209 mbstring_binary_safe_encoding(); |
209 mbstring_binary_safe_encoding(); |
210 |
210 |
211 $bytes_written = fwrite( $temphandle, $contents ); |
211 $bytes_written = fwrite( $temphandle, $contents ); |
212 |
212 |
213 if ( false === $bytes_written || strlen( $contents ) != $bytes_written ) { |
213 if ( false === $bytes_written || strlen( $contents ) !== $bytes_written ) { |
214 fclose( $temphandle ); |
214 fclose( $temphandle ); |
215 unlink( $tempfile ); |
215 unlink( $tempfile ); |
216 |
216 |
217 reset_mbstring_encoding(); |
217 reset_mbstring_encoding(); |
218 |
218 |
549 /** |
549 /** |
550 * Creates a directory. |
550 * Creates a directory. |
551 * |
551 * |
552 * @since 2.5.0 |
552 * @since 2.5.0 |
553 * |
553 * |
554 * @param string $path Path for new directory. |
554 * @param string $path Path for new directory. |
555 * @param int|false $chmod Optional. The permissions as octal number (or false to skip chmod). |
555 * @param int|false $chmod Optional. The permissions as octal number (or false to skip chmod). |
556 * Default false. |
556 * Default false. |
557 * @param string|int $chown Optional. A user name or number (or false to skip chown). |
557 * @param string|int|false $chown Optional. A user name or number (or false to skip chown). |
558 * Default false. |
558 * Default false. |
559 * @param string|int $chgrp Optional. A group name or number (or false to skip chgrp). |
559 * @param string|int|false $chgrp Optional. A group name or number (or false to skip chgrp). |
560 * Default false. |
560 * Default false. |
561 * @return bool True on success, false on failure. |
561 * @return bool True on success, false on failure. |
562 */ |
562 */ |
563 public function mkdir( $path, $chmod = false, $chown = false, $chgrp = false ) { |
563 public function mkdir( $path, $chmod = false, $chown = false, $chgrp = false ) { |
564 $path = untrailingslashit( $path ); |
564 $path = untrailingslashit( $path ); |
565 |
565 |
648 |
648 |
649 if ( ! $include_hidden && '.' === $struc['name'][0] ) { |
649 if ( ! $include_hidden && '.' === $struc['name'][0] ) { |
650 continue; |
650 continue; |
651 } |
651 } |
652 |
652 |
653 if ( $limit_file && $struc['name'] != $limit_file ) { |
653 if ( $limit_file && $struc['name'] !== $limit_file ) { |
654 continue; |
654 continue; |
655 } |
655 } |
656 |
656 |
657 if ( 'd' === $struc['type'] ) { |
657 if ( 'd' === $struc['type'] ) { |
658 if ( $recursive ) { |
658 if ( $recursive ) { |