Click or drag to resize
MediaFileInfoProvider.DeleteMediaFile Method
Deletes media file from file system.

Namespace: CMS.MediaLibrary
Assembly: CMS.MediaLibrary (in CMS.MediaLibrary.dll) Version: 12.0.0
Syntax
C#
public static void DeleteMediaFile(
	int siteId,
	int libraryId,
	string filePath,
	bool onlyFile = false,
	bool synchronization = false
)

Parameters

siteId
Type: System.Int32
Site id
libraryId
Type: System.Int32
Library id
filePath
Type: System.String
Sub path to file
onlyFile (Optional)
Type: System.Boolean
Indicates if only file should be deleted
synchronization (Optional)
Type: System.Boolean
Indicates if method is running by web farms synchronization
See Also