copy()
Copy files and folders
copy()
This method will copy items to a new location.
Parameters
Name
Type
Description
$entry_ids
array
ID of the entries that should be copied.
$target_id
string
ID of the folder where the entry should be copied to.
Return
Name
Type
Description
$nodes
CachedNode[]
An array of objects for the copied files/folders.
Usage
WPCP_ONEDRIVE_API::set_account_by_id('8c9bacda0-d8d8-4b22-b634-7b5281687575');
WPCP_ONEDRIVE_API::set_drive_by_id('b!DlaHWskCed_MIid3KpJH5Lbatf9HsdXBAZH5YcvPAbMhJUKzTJyzgvXZYpBS');
$entry_ids = [
'01EXLSWHWMQZNDMLRG7NFIWAVYCFJAXP2R',
'01EXLSWHW3APNASPERAVGJEAVQAMUNIKF6'
];
$nodes = WPCP_ONEDRIVE_API::copy($entry_ids, '01EXLSWHRCD7RDL3HX65BK5X3ULXLWSICN');
Last updated