public class DefaultFileSource extends BaseSource implements FileSource
FileSource interface.
The source ID is "ScriptFile_<canonical-or-absolute-file-path>".
id| Constructor and Description |
|---|
DefaultFileSource(File file)
constructor from script file.
|
| Modifier and Type | Method and Description |
|---|---|
File |
getFile()
gets the canonical file of this source, with fallback to the absolute file.
|
long |
getLastModified()
always returns 0.
|
equals, getId, hashCode, toStringpublic DefaultFileSource(File file)
The file is always converted to the canonical file, with fallback to the absolute file.
The ID is the canonical file path, with fallback to the absolute file path.
file - script fileNullPointerException - if file is nullpublic long getLastModified()
BaseSourcegetLastModified in interface SourcegetLastModified in class BaseSourcepublic File getFile()
FileSource
Hence fileSource.getFile().isAbsolute() always returns true.
getFile in interface FileSource