ssh2_sftp_mkdir(3) php man page | unix.com

Man Page: ssh2_sftp_mkdir

Operating Environment: php

Section: 3

SSH2_SFTP_MKDIR(3)							 1							SSH2_SFTP_MKDIR(3)

ssh2_sftp_mkdir - Create a directory

SYNOPSIS
bool ssh2_sftp_mkdir (resource $sftp, string $dirname, [int $mode = 0777], [bool $recursive = false])
DESCRIPTION
Creates a directory on the remote file server with permissions set to $mode. This function is similar to using mkdir(3) with the ssh2.sftp:// wrapper.
PARAMETERS
o $sftp - An SSH2 SFTP resource opened by ssh2_sftp(3). o $dirname - Path of the new directory. o $mode - Permissions on the new directory. o $recursive - If $recursive is TRUE any parent directories required for $dirname will be automatically created as well.
RETURN VALUES
Returns TRUE on success or FALSE on failure.
EXAMPLES
Example #1 Creating a directory on a remote server <?php $connection = ssh2_connect('shell.example.com', 22); ssh2_auth_password($connection, 'username', 'password'); $sftp = ssh2_sftp($connection); ssh2_sftp_mkdir($sftp, '/home/username/newdir'); /* Or: mkdir("ssh2.sftp://$sftp/home/username/newdir"); */ ?>
SEE ALSO
mkdir(3), ssh2_sftp_rmdir(3). PHP Documentation Group SSH2_SFTP_MKDIR(3)
Related Man Pages
sftp-server(1m) - x11r4
sftp-server(1m) - plan9
ssh2_sftp_stat(3) - php
sftp-server(1m) - minix
sftp-server(1m) - ultrix
Similar Topics in the Unix Linux Community
sftp file transfer
Apache 0777 directories
Using sftp from one server to other server
sftp connection closes if idle for around 10minutes
Passwordless sftp issue