Method DeleteFilesInTempFolder
DeleteFilesInTempFolder(string?)
Deletes files in the temporary folder that match the specified search pattern.
public static bool DeleteFilesInTempFolder(string? searchPattern = null)
Parameters
searchPattern
stringThe search pattern to match files (e.g., "*.txt"). If null, all files in the temporary folder are deleted.
Returns
- bool
true
if the operation succeeds or the folder does not exist;false
if an exception occurs during the operation.