Click or drag to resize

fileOpsBasedeleteFiles Method (DirectoryInfo, String, Boolean, Boolean)

imbSCI | imbACE | imbNLP | imbWEM | imbWBI
Deletes the files.

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

Parameters

targetFolder
Type: System.IODirectoryInfo
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 DirectoryInfo. 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