-
Notifications
You must be signed in to change notification settings - Fork 14
Conflict Behaviors
Kunal Varma edited this page Mar 9, 2016
·
1 revision
The default Conflict Behavior if set to fail
. Thus, if an item with the same name already exists, OneDrive will return an error.
If Conflict Behavior is set to replace
and an item with the same name already exists in the destination, the new item will override the existing one.
$folder = $client->createFolder("Test Folder", null, "replace");
If Conflict Behavior is set to rename
and an item with the same name already exists in the destination, the new item name will be updated to be unique.OneDrive will append a number to the end of the item name (for files - before the extension).
For example, hello.txt
would be renamed hello 1.txt
. If hello 1.txt
is taken, then the number would be incremented again until a unique filename is discovered.
$file = "helloworld.txt";
$conflictBehavior = "replace";
$createdFile = $client->uploadFile($file, null, null, "rename");
- Working with Drives
- Fetch Item
- [Fetch Children of a folder](Fetch Folder Items)
- Search
- Item Thumbnails
- [Download Item and Save it to a file](Download Item)
- Create Folder
- Create OR Upload File
- Conflict Behaviors
- [Update an Item's MetaData](Update Item Metadata)
- Copying and Moving Items
- Deleting an Item
- Create Sharing Links