StorageHelperDeleteOldFiles Method (String, DateTime, Boolean) |
Deletes files older than specified time from the file system.
Namespace: CMS.IOAssembly: CMS.IO (in CMS.IO.dll) Version: 10.0.0
Syntax public static void DeleteOldFiles(
string folder,
DateTime olderThan,
bool deleteEmptyFolder = true
)
Parameters
- folder
- Type: SystemString
Folder path - olderThan
- Type: SystemDateTime
Limit time for deletion of a file - deleteEmptyFolder (Optional)
- Type: SystemBoolean
Indicates if the specified folder should be deleted if there are no files left at the end
See Also