Class FileFinder
- All Implemented Interfaces:
FilePath.FileCallable<String[]>
,Serializable
,org.jenkinsci.remoting.RoleSensitive
Scans the workspace and finds all files matching a given ant pattern.
- Author:
- Ullrich Hafner
- See Also:
-
Constructor Summary
ConstructorDescriptionFileFinder
(String includesPattern) Creates a new instance ofFileFinder
.FileFinder
(String includesPattern, String excludesPattern) Creates a new instance ofFileFinder
.FileFinder
(String includesPattern, String excludesPattern, boolean followSymlinks) Creates a new instance ofFileFinder
. -
Method Summary
Methods inherited from class jenkins.MasterToSlaveFileCallable
checkRoles
-
Constructor Details
-
FileFinder
Creates a new instance ofFileFinder
.- Parameters:
includesPattern
- the ant file includes pattern to scan for
-
FileFinder
Creates a new instance ofFileFinder
.- Parameters:
includesPattern
- the ant file includes pattern to scan forexcludesPattern
- the ant file excludes pattern to scan for
-
FileFinder
Creates a new instance ofFileFinder
.- Parameters:
includesPattern
- the ant file includes pattern to scan forexcludesPattern
- the ant file excludes pattern to scan forfollowSymlinks
- if the scanner should traverse symbolic links
-
-
Method Details
-
invoke
Returns an array with the file names of the specified file pattern that have been found in the workspace.- Parameters:
workspace
- root directory of the workspacechannel
- not used- Returns:
- the file names of all found files
- Throws:
IOException
- if the workspace could not be read
-
find
Returns an array with the file names of the specified file pattern that have been found in the workspace.- Parameters:
workspace
- root directory of the workspace- Returns:
- the file names of all found files
-