Creating, Updating, and Deleting Files

Applies to: SharePoint Workspace 2010 | Visual Studio 2008

The Create operation creates a file or a folder, the UpdateFile operation updates a file or folder, the UpdateUnreadMark operation marks a file or folder as read or unread, and the Delete operation deletes a file or a folder. The contents of the file are encoded using Base64. This corresponds to the SOAP data type xs:base64Binary.

When you are updating a file, you can change the file's name and its contents. You specify the file's new name in the FileDescriptor DisplayName. You can only change the display name of the file; you cannot change the file type. Although you have to specify the other required elements of the FileDescriptor structure, the Update operation ignores their values. Note that you cannot move a file to a new folder by updating the FileDescriptor FolderID element. The Update operation ignores the new FolderID value.

When another member adds or replaces a file, some file contents may not be downloaded. You can explicitly download file contents either programmatically or through the user interface.

When you are updating a folder, you can change the DisplayName, AutoDownload, and DownloadSizeLimit elements.

You cannot update the Unread state of a file or folder using the Update operation. The Update operation ignores the new value. Note that when you update a file or folder either through Web Services or the Groove Files tool user interface, the Files tool marks the file or folder as read for the current user and unread for the other members of the space. To update the unread mark of a file or a folder, use the UpdateUnreadMark operation.

The UpdateUnreadMark marks a file or folder read or unread. If the UpdateUnreadMarkUnreadState parameter has a true, the folder or file is marked unread. If it has a false value, the folder or file is marked read. Note that if you update the unread mark for a folder, it recursively updates the unread mark for all files that the folder contains.

The DeleteFile operation deletes a file or folder. If you delete a folder, the operation deletes the folder and all files and folders that it contains.

If you are working in the .NET development environment, be aware that the automatically-generated proxy code for the FileDescriptor structure contains extra "Specified" elements for optional elements, such as AutoDownloadSpecified for AutoDownload. If you are updating a file or folder and are modifying one of these optional elements, you must ensure that the corresponding "Specified" parameter is true. For example, if you are modifying a folder and updating the AutoDownload element of the file descriptor, you must set the AutoDownloadSpecified element to true to ensure that the proxy code includes the optional element when it generates the SOAP message.

See Also


GrooveFilesBase64 Web Service


Accessing Files Tool Data