FolderSyncronizerKill Method (ConnectionId, SessionId, Int32, FolderBaseCSFileFolderTypes, Boolean, Int32) Content Studio 5.7 SDK
Content Studio Web Content Management System

[This is preliminary documentation and is subject to change.]

Deletes all files in a folder and optionally the folder itself in the underlying file system.

Namespace: ContentStudio.Document
Assembly: CSServer5 (in CSServer5.dll) Version: 5.7.5016.0 (5.7.5016.0)
Syntax

public void Kill(
	ConnectionId connectionId,
	SessionId sessionId,
	int folderId,
	FolderBaseCSFileFolderTypes folderType,
	bool killFolder,
	out int deletedFiles
)

Parameters

connectionId
Type: ContentStudioConnectionId
A value that identifies the web site
sessionId
Type: ContentStudio.SecuritySessionId
A value that identifies the user's session. This value usually originates from a call to OpenSession(ConnectionId).
folderId
Type: SystemInt32
The id of the folder that should be synchronized.
folderType
Type: ContentStudio.DocumentFolderBaseCSFileFolderTypes
The type of folder (Root, Unit or Category) to be synchronized
killFolder
Type: SystemBoolean
Set to true to deletes the folder as well.
deletedFiles
Type: SystemInt32
Returns the number of files deleted in the folder
Exceptions

ExceptionCondition
CSExceptionA business rule was violated in the underlying Content Studio database
SqlExceptionAn error occurred when executing the command against the Content Studio database
DirectoryNotFoundExceptionThe specified path is invalid (for example, it is on an unmapped drive).
UnauthorizedAccessExceptionThe Content Studio runtime does not have the required permission. -or- Path is not a directory. -or- Path specified a read-only directory.
Content Studio permissions

Global group admin or synchronize right is required in order to delete files and/or folders.
Remarks

If you call this method is series and you wish to delete the folder itself you must ensure that no subfolders exists. The System/Assemblies folder which maps to the Bin folder is not affected by this method.
See Also

Reference