UpdateResource Method
Updates the file or folder.
Syntax
[VB.NET] Public Sub UpdateResource()
[C#] public void UpdateResource();
Remarks
This method may be used to update a file or folder. The following properties are applicable when calling this method:
To move a resource to a new location set ResourceParentId and call this method.
If LocalFile, or ResourceData is specified or a stream is specified via SetUploadStream the file content will also be updated. To update only the properties of the file without modifying the content set ResourceData and LocalFile to empty string.
//Update only the properties of the file. box.LocalFile = ""; box.ResourceData = ""; box.ResourceTags = "tag1,tag2"; box.ResourceDescription = "New Description"; box.ResourceName = "NewName.txt"; box.UpdateResource(); //Update the properties and file data. box.LocalFile = "..\\NewFileData.txt"; box.ResourceDescription = "Updated Today"; box.UpdateResource();