Content Studio Web Content Management System
Assembly: CSServer5 (in CSServer5.dll) Version: 5.7.5016.0 (5.7.5016.0)
The new file path for the document.
APPROVE permission on the document is required.
Unlike many other methods that changes data on a document this method does not require the document to be checked out
by the caller. If document is checked out by another user the method will fail and a CSException with number 1820 will be thrown.
[This is preliminary documentation and is subject to change.]
Changes the file name of a document.
Namespace: ContentStudio.Document
Assembly: CSServer5 (in CSServer5.dll) Version: 5.7.5016.0 (5.7.5016.0)
Syntax
Parameters
- documentId
- Type: ContentStudio.DocumentDocumentId
The document id for the document to be renamed. This value must be resolved. - newFileName
- Type: SystemString
New name of the file. If this file name contains a file extension, this extension must be allowed according to the AllowedFileExtension of the category. If no extension is specified the default extension is used. If a path is provided the path part is ignored rather that generating an exception.
Return Value
Type: StringThe new file path for the document.
Exceptions
Exception | Condition | ||||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|---|
ArgumentNullException | newFileName cannot be null. | ||||||||||||
ArgumentException | documentId is not resolved. | ||||||||||||
CSInvalidSessionException | The session is invalid. | ||||||||||||
CSDocumentNotFoundException | The document does not exist. | ||||||||||||
CSPermissionDeniedException | Permission to the document was denied. | ||||||||||||
CSException |
| ||||||||||||
IOException | Content Studio cannot write one or more files to the underlying file system. | ||||||||||||
SqlException | An error occurred when executing the command against the Content Studio database |
Content Studio permissions
Remarks
Note |
---|
This method is new in Content Studio version 5.2 |
See Also