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, toString
public 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()
BaseSource
getLastModified
in interface Source
getLastModified
in class BaseSource
public File getFile()
FileSource
Hence fileSource.getFile().isAbsolute()
always returns true.
getFile
in interface FileSource