Back to FabImage Library websiteYou are here:
Start »
Function Reference »
File System »
RemoveFiles
Header: | STD.h |
Namespace: | fil |
Removes files that match a pattern from a directory.
Syntax
void fil::RemoveFiles
(
const ftl::Directory& inStartDirectory,
const ftl::String& inMask,
bool inProcessSubdirectories,
bool& outSuccess
)
Parameters
|
Name |
Type |
Default |
Description |
 |
inStartDirectory |
const Directory& |
|
|
 |
inMask |
const String& |
|
Wildcard pattern |
 |
inProcessSubdirectories |
bool |
|
|
 |
outSuccess |
bool& |
|
|
Remarks
inMask pattern string
Port
inMask specifies wildcard pattern that selects files this filter will operate on.
Supported wildcards:
- * - any string of characters, including no characters
- ? - exactly one character
You can use any expression like examples below:
Examples:
- * - all files,
- *.jpg - files only with extension .jpg,
- Filename.* - files with name "Filename" and any extension, including no extension e.g. "Filename."
- Filename.?? - files with name "Filename" and two letter extension,
Errors
List of possible exceptions:
Error type |
Description |
DomainError |
inMask needs to be filled in |
DomainError |
inStartDirectory needs to be filled in |
See Also
- FindFiles – Returns files of the input directory.