Click or drag to resize

fileOpsBasedeleteFiles Method (String, String, Boolean, Boolean)

imbSCI | imbACE | imbNLP | imbWEM | imbWBI
Deletes the files matching the selectionPattern

Namespace:  imbSCI.Core.extensions.io
Assembly:  imbSCI.Core (in imbSCI.Core.dll) Version: 0.3.58.
Syntax
C#
public static void deleteFiles(
	this string targetFolder,
	string selectionPattern = "*.*",
	bool subFolders = false,
	bool allowOutOfSandBoxTarget = false
)
Request Example View Source

Parameters

targetFolder
Type: SystemString
The target folder.
selectionPattern (Optional)
Type: SystemString
The selection pattern.
subFolders (Optional)
Type: SystemBoolean
if set to true [sub folders].
allowOutOfSandBoxTarget (Optional)
Type: SystemBoolean
if set to true [allow out of sand box target].

Usage Note

In Visual Basic and C#, you can call this method as an instance method on any object of type String. When you use instance method syntax to call this method, omit the first parameter. For more information, see Extension Methods (Visual Basic) or Extension Methods (C# Programming Guide).
Exceptions
ExceptionCondition
ExceptionSandbox Exception: can't delete files outside application folder [" + fileOpsBase.applicationFolder.FullName + "]. Requested delete path [" + targetFolder + "].
See Also