...
Info | ||
---|---|---|
| ||
This routine is available since starting with katl-commons 1.1.2. |
Syntax
...
findFiles(directory, regex)
Description
...
Excerpt |
---|
Searches for files that match the given regex, in the specified folder. The routine only searches for files and NOT directories. |
...
The regex match is done on the file name, not the full path. If the regex parameter is empty string, the routine returns an empty result
Parameters
...
Parameter name | Type | Required | Description |
---|---|---|---|
directory | string | Yes | Specifies the directory to search into. |
regex | string | Yes | Specifies the file pattern to search for. |
Return type
...
string []
Returns an array containing the absolute paths of all files from the given directory whose name match the regex.
Example
...
Code Block |
---|
findFiles("C:/JIRA/plugins", ".*\\.jar"); |
Results: An array containing all absolute paths for jar files from the folder C:\JIRA\plugins.
Notes
...
Note |
---|
|
See also
...
Filter by label (Content by label) | ||||||||
---|---|---|---|---|---|---|---|---|
|