public class SourceFileScanner extends Object implements ResourceFactory
The only method returns an array of source files. The array is a subset of the files given as a parameter and holds only those that are newer than their corresponding target files.
| Constructor and Description |
|---|
SourceFileScanner() |
| Modifier and Type | Method and Description |
|---|---|
Resource |
getResource(String name)
returns resource information for a file at destination
|
String[] |
restrict(String[] files,
File srcDir,
File destDir,
FileNameMapper mapper)
Restrict the given set of files to those that are newer than
their corresponding target files.
|
String[] |
restrict(String[] files,
File srcDir,
File destDir,
FileNameMapper mapper,
long granularity)
Restrict the given set of files to those that are newer than
their corresponding target files.
|
File[] |
restrictAsFiles(String[] files,
File srcDir,
File destDir,
FileNameMapper mapper)
Convinience layer on top of restrict that returns the source
files as File objects (containing absolute paths if srcDir is
absolute).
|
File[] |
restrictAsFiles(String[] files,
File srcDir,
File destDir,
FileNameMapper mapper,
long granularity)
Convinience layer on top of restrict that returns the source
files as File objects (containing absolute paths if srcDir is
absolute).
|
public String[] restrict(String[] files, File srcDir, File destDir, FileNameMapper mapper) throws Exception
files - the original set of filessrcDir - all files are relative to this directorydestDir - target files live here. if null file names
returned by the mapper are assumed to be absolute.mapper - knows how to construct a target file names from
source file names.Exceptionpublic String[] restrict(String[] files, File srcDir, File destDir, FileNameMapper mapper, long granularity) throws Exception
files - the original set of filessrcDir - all files are relative to this directorydestDir - target files live here. if null file names
returned by the mapper are assumed to be absolute.mapper - knows how to construct a target file names from
source file names.granularity - The number of milliseconds leeway to give
before deciding a target is out of date.Exceptionpublic File[] restrictAsFiles(String[] files, File srcDir, File destDir, FileNameMapper mapper) throws Exception
Exceptionpublic File[] restrictAsFiles(String[] files, File srcDir, File destDir, FileNameMapper mapper, long granularity) throws Exception
Exceptionpublic Resource getResource(String name) throws Exception
getResource in interface ResourceFactoryname - relative path of file at destinationExceptionCopyright © 2001–2025. All rights reserved.