src/Client.php
public function createFolder($name, $parentId = null, $description = null)
    {
        $message = sprintf(
            '%s() is deprecated and will be removed in version 3;'
                . ' use Krizalys\Onedrive\Proxy\DriveItemProxy::createFolder()'
                . ' instead',
            __METHOD__
        );

        @trigger_error($message, E_USER_DEPRECATED);
        $drive = $this->getMyDrive();

        $item = $parentId !== null ?
            $this->getDriveItemById($drive->id, $parentId)
            : $drive->getRoot();

        $options = [];

        if ($description !== null) {
            $options += [
                'description' => (string) $description,
            ];
        }

        $item    = $item->createFolder($name, $options);
        $options = $this->buildOptions($item, ['parent_id' => $parentId]);

        return new Folder($this, $item->id, $options);
    }
public function createFolder($name, $parentId = null, $description = null)
    {
        $message = sprintf(
            '%s() is deprecated and will be removed in version 3;'
                . ' use Krizalys\Onedrive\Proxy\DriveItemProxy::createFolder()'
                . ' instead',
            __METHOD__
        );

        @trigger_error($message, E_USER_DEPRECATED);
        $drive = $this->getMyDrive();

        $item = $parentId !== null ?
            $this->getDriveItemById($drive->id, $parentId)
            : $drive->getRoot();

        $options = [];

        if ($description !== null) {
            $options += [
                'description' => (string) $description,
            ];
        }

        $item    = $item->createFolder($name, $options);
        $options = $this->buildOptions($item, ['parent_id' => $parentId]);

        return new Folder($this, $item->id, $options);
    }
public function createFolder ( $ name , $ parentId = null , $ description = null ) { $ message = sprintf ( '%s() is deprecated and will be removed in version 3;' . ' use Krizalys\Onedrive\Proxy\DriveItemProxy::createFolder()' . ' instead' , __METHOD__ ) ; @ trigger_error ( $ message , E_USER_DEPRECATED ) ; $ drive = $ this -> getMyDrive ( ) ; $ item = $ parentId !== null ? $ this -> getDriveItemById ( $ drive -> id , $ parentId ) : $ drive -> getRoot ( ) ; $ options = [ ] ; if ( $ description !== null ) { $ options += [ 'description' => ( string ) $ description , ] ; } $ item = $ item -> createFolder ( $ name , $ options ) ; $ options = $ this -> buildOptions ( $ item , [ 'parent_id' => $ parentId ] ) ; return new Folder ( $ this , $ item -> id , $ options ) ; }
Creates a folder in the current OneDrive account.

@param string $name
The name of the OneDrive folder to be created.
@param null|string $parentId
The ID of the OneDrive folder into which to create the OneDrive
folder, or null to create it in the OneDrive root folder. Default:
null.
@param null|string $description
The description of the OneDrive folder to be created, or null to
create it without a description. Default: null.

@return Folder
The folder created, as a Folder instance referencing to the
OneDrive folder created.

@deprecated Use Krizalys\Onedrive\Proxy\DriveItemProxy::createFolder()
instead.
Creates a folder in the current OneDrive account .