org.sonar.api.resources
Interface InputFile


public interface InputFile

Since:
2.6

Method Summary
 File getFile()
           
 File getFileBaseDir()
          The source base directory, different than the project basedir.
 String getRelativePath()
          Path relative to basedir.
 

Method Detail

getFileBaseDir

File getFileBaseDir()
The source base directory, different than the project basedir. For example in maven projects, the basedir of a source file stored in src/main/java/org/foo/ is the directory src/main/java.


getFile

File getFile()

getRelativePath

String getRelativePath()
Path relative to basedir. Directory separator is slash '/', whatever the platform. Example on windows: if file basedir is c:\project\src\ and file is c:\project\src\org\foo\Bar.java, then relative path is org/foo/Bar.java Example on unix: if file basedir is /project/src and file is /project/src/org/foo/Bar.java, then relative path is org/foo/Bar.java as well.



Copyright © 2009-2012 SonarSource. All Rights Reserved.