delete()
This method will delete files and folders.
$ids[]
array
ID of the entries that should be deleted.
$nodes
CachedNode[]
An array of Entry objects for the deleted files/folders
WPCP_ONEDRIVE_API::set_account_by_id('8c9bacda0-d8d8-4b22-b634-7b5281687575'); WPCP_ONEDRIVE_API::set_drive_by_id('b!DlaHWskCed_MIid3KpJH5Lbatf9HsdXBAZH5YcvPAbMhJUKzTJyzgvXZYpBS'); $ids = [ '01EXLSWHWMQZNDMLRG7NFIWAVYCFJAXP2R', '01EXLSWHW3APNASPERAVGJEAVQAMUNIKF6' ]; $deleted_nodes = WPCP_ONEDRIVE_API::delete($ids');
$ids
IDs of the entries that should be deleted.
$trash
bool
Trash the content or delete it permanently. Default: $trash = true.
$trash = true
An array of objects for the deleted files/folders.
WPCP_GDRIVE_API::set_account_by_id('201096615285735764133') $ids = [ '1wzWlDMsZkA4N5yEEAmMigp52u7M0Lk_7', '1w7wpGF9jo4ZDmFaXxoBRDbCnotCmypJZ' ]; // Delete the files permanently ($trash = false) $deleted_nodes = WPCP_GDRIVE_API::delete($ids, false);
$request
An array with 'path' keys. Path can both be an ID or a actual path.
$entries
Entry[]
WPCP_DROPBOX_API::set_account_by_id('dbid:AADSy6JxzbgqCs4A43CAAAfO9xvZwpcsLU'); $request = ['entries' => []]; $request['entries'][] = ['path' => '/Homework/math']; $request['entries'][] = ['path' => '/Documents/a picture.jpg']; $delete_entries = WPCP_DROPBOX_API::delete($request);
$id
string
ID of the entry that should be deleted.
$is_dir
Is the entry a folder or a file?
$result
Returns if the delete action was successful.
WPCP_BOX_API::set_account_by_id('29232154182'); $is_deleted = WPCP_BOX_API::delete('51142665', false);
Last updated 6 months ago