CMISDeleteFile

Deletes a file on the CMIS server.

Member of namespace

CMISClient

Syntax

bool CMISDeleteFile(string cmisFilePath, bool ignoreFailure)

Parameters

cmisFilePath
Type: string
ignoreFailure
Type: bool

Parameters

  • cmisFilePath : The file to delete on the CMIS server. Smart parameters are supported.
  • ignoreFailure : Set to True to ignore any failure so the action will always return True.

Returns

If ignoreFailure is True, the action always returns True, even if the file could not be deleted. If ignoreFailure is False, returns True if the file is deleted, otherwise False is returned.

Level:

All levels.

Details

Deletes the specified file in the CMIS repository.

Some, but not all, repositories have the notion of a "soft" delete, which will perform the final deletion at a later time. You should assume that once the object is deleted, that it is deleted forever. If an object is deleted, it can only be restored if the repository provides a mechanism to restore the object.

A delete failure can be ignored by using the ignoreFailure parameter. This allows actions to continue even if the delete should fail.

Example:
CMISDeleteFile("/MyFolder/MyDoc.txt", false)               

This returns true if MyDoc.txt is deleted, otherwise it returns false.

CMISDeleteFile("/MyFolder/MyDoc.txt", true)

This always returns true, even if the file could not be deleted.