create_folder()

Create new folder

create_folder()

This method will create a new folder in the cloud.

Parameters

Name
Type
Description

$new_name

string

The name of the folder to be created.

$parent_id

string

ID of the folder where the new folder should be created.

Return

Name
Type
Description

$node

CachedNode

The cached object for the new created folder.

Usage

WPCP_ONEDRIVE_API::set_account_by_id('8c9bacda0-d8d8-4b22-b634-7b5281687575');
WPCP_ONEDRIVE_API::set_drive_by_id('b!DlaHWskCed_MIid3KpJH5Lbatf9HsdXBAZH5YcvPAbMhJUKzTJyzgvXZYpBS');

// Create a new folder
$node = WPCP_ONEDRIVE_API::create_folder('Documents', '01EXLSWHRCD7RDL3HX65BK5X3ULXLWSICN');

Last updated