mkdir($path[, $permissions = NULL]) 
Parameters:
$path (string) – Path to directory to create 
$permissions (int) – Permissions (octal)  Returns:
TRUE on success, FALSE on failure  Return type:
bool  
Lets you create a directory on your server. Supply the path ending in the folder name you wish to create, with a trailing slash.
Permissions can be set by passing an octal value in the second parameter.
// Creates a folder named "bar"
$this->ftp->mkdir('/public_html/foo/bar/', 0755);