WP_Filesystem_ftpsockets::mkdir() – Creates a directory.

You appear to be a bot. Output may be restricted

Description

Creates a directory.

Usage

$bool = WP_Filesystem_ftpsockets::mkdir( $path, $chmod, $chown, $chgrp );

Parameters

$path
( string ) required – Path for new directory.
$chmod
( int|false ) optional – Optional. The permissions as octal number (or false to skip chmod). Default false.
$chown
( string|int|false ) optional – Optional. A user name or number (or false to skip chown). Default false.
$chgrp
( string|int|false ) optional – Optional. A group name or number (or false to skip chgrp). Default false.

Returns

bool True on success, false on failure.

Source

File name: wordpress/wp-admin/includes/class-wp-filesystem-ftpsockets.php
Lines:

1 to 19 of 19
  public function mkdir( $path, $chmod = false, $chown = false, $chgrp = false ) {
    $path = untrailingslashit( $path );

    if ( empty( $path ) ) {
      return false;
    }

    if ( ! $this->ftp->WP_Filesystem_ftpsockets::mkdir( $path ) ) {
      return false;
    }

    if ( ! $chmod ) {
      $chmod = FS_CHMOD_DIR;
    }

    $this->WP_Filesystem_ftpsockets::chmod( $path, $chmod );

    return true;
  }
 

 View on GitHub View on Trac