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()
Deprecated.
since 6.6 use
inputStream() , filename() or uri() |
File |
file()
Deprecated.
since 6.6 use
inputStream() , filename() or uri() |
String |
filename()
Filename for this file (inclusing extension).
|
InputStream |
inputStream()
Creates a stream of the file's contents.
|
String |
language()
Language, for example "java" or "php".
|
Path |
path()
Deprecated.
since 6.6 use
inputStream() , filename() or uri() |
String |
relativePath()
Deprecated.
since 6.6 use
inputStream() , filename() or uri() |
InputFile.Type |
type()
Does it contain main or test code ?
|
URI |
uri()
Identifier of the file.
|
isFile, key
@Deprecated String relativePath()
inputStream()
, filename()
or uri()
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 InputPath
InputFile.relativePath()
,
InputDir.relativePath()
@Deprecated String absolutePath()
inputStream()
, filename()
or uri()
file().getCanonicalPath()
to resolve symbolic link.absolutePath
in interface InputPath
InputFile.absolutePath()
,
InputDir.absolutePath()
@Deprecated File file()
inputStream()
, filename()
or uri()
File
. It should not be used to read the file in the filesystem.file
in interface InputPath
#contents()
,
inputStream()
@Deprecated Path path()
inputStream()
, filename()
or uri()
Path
.
It should not be used to read the file in the filesystem.path
in interface InputPath
#contents()
,
inputStream()
URI uri()
String filename()
@CheckForNull String language()
InputFile.Type type()
InputStream inputStream() throws IOException
IOException
Copyright © 2009–2017 SonarSource. All rights reserved.