public interface IndexedFile extends InputPath
InputFile. Accessing any of data exposed here won't trigger the expensive generation of
metadata for the InputFile.| Modifier and Type | Method and Description |
|---|---|
String |
absolutePath()
Normalized absolute path.
|
File |
file()
The underlying absolute
File. |
InputStream |
inputStream()
Creates a stream of the file's contents.
|
String |
language()
Language, for example "java" or "php".
|
Path |
path()
The underlying absolute
Path. |
String |
relativePath()
Path relative to module base directory.
|
InputFile.Type |
type()
Does it contain main or test code ?
|
isFile, keyString relativePath()
FileSystem. File separator is the forward
slash ('/'), even on Microsoft Windows.
src/main/java/com/Foo.java if module base dir is
/path/to/module and if file is
/path/to/module/src/main/java/com/Foo.java.
relativePath in interface InputPathInputFile.relativePath(),
InputDir.relativePath()String absolutePath()
file().getCanonicalPath() to resolve symbolic link.absolutePath in interface InputPathInputFile.absolutePath(),
InputDir.absolutePath()File file()
File. It should not be used to read the file in the filesystem.file in interface InputPath#contents(),
inputStream()Path path()
Path.
It should not be used to read the file in the filesystem.path in interface InputPath#contents(),
inputStream()@CheckForNull String language()
InputFile.Type type()
InputStream inputStream() throws IOException
IOExceptionCopyright © 2009–2017 SonarSource. All rights reserved.