diff options
Diffstat (limited to 'sonar-plugin-api/src/main/java/org/sonar/api/resources/InputFile.java')
-rw-r--r-- | sonar-plugin-api/src/main/java/org/sonar/api/resources/InputFile.java | 10 |
1 files changed, 10 insertions, 0 deletions
diff --git a/sonar-plugin-api/src/main/java/org/sonar/api/resources/InputFile.java b/sonar-plugin-api/src/main/java/org/sonar/api/resources/InputFile.java index 6e87e3445ad..4c926f897e1 100644 --- a/sonar-plugin-api/src/main/java/org/sonar/api/resources/InputFile.java +++ b/sonar-plugin-api/src/main/java/org/sonar/api/resources/InputFile.java @@ -30,4 +30,14 @@ public interface InputFile { File getFile(); + /** + * Path relative to basedir. Directory separator is slash '/', whatever the platform. + * + * Example on windows: if 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 basedir is /project/src and file is /project/src/org/foo/Bar.java, then relative path + * is org/foo/Bar.java as well. + */ + String getRelativePath(); } |