@Test public void ofShared() throws URISyntaxException { URL url = getClass().getResource("/com/sonar/orchestrator/locator/FileLocationTest/index.txt"); FileLocation location = FileLocation.ofShared("abap/foo.txt", FilenameUtils.getFullPath(url.toURI().getPath())); assertThat(location.getFile().isFile()).isTrue(); assertThat(location.getFile().exists()).isTrue(); assertThat(location.getFile().getName()).isEqualTo("foo.txt"); }
@Deprecated public static FileLocation ofShared(String relativePath) { String prop = System.getProperty(PROP_SHARED_DIR); return ofShared(relativePath, prop != null ? prop : System.getenv(ENV_SHARED_DIR)); }
FileLocation implements Location { @Deprecated public static FileLocation ofShared(String relativePath) { String prop = System.getProperty(PROP_SHARED_DIR); return ofShared(relativePath, prop != null ? prop : System.getenv(ENV_SHARED_DIR)); } }
FileLocation implements Location { @Deprecated public static FileLocation ofShared(String relativePath) { String prop = System.getProperty(PROP_SHARED_DIR); return ofShared(relativePath, prop != null ? prop : System.getenv(ENV_SHARED_DIR)); } private  FileLocation(File file); }
FileLocation implements Location { @Deprecated public static FileLocation ofShared(String relativePath) { String prop = System.getProperty(PROP_SHARED_DIR); return ofShared(relativePath, prop != null ? prop : System.getenv(ENV_SHARED_DIR)); } private  FileLocation(File file); static FileLocation of(File file); static FileLocation of(String path); static FileLocation of(URL url); static ResourceLocation ofClasspath(String pathStartingWithSlash); static FileLocation byWildcardFilename(File directory, String wildcardFilename); static FileLocation byWildcardMavenFilename(File directory, String wildcardFilename); @Deprecated static FileLocation ofShared(String relativePath); File getFile(); @Override boolean equals(Object o); @Override int hashCode(); @Override String toString(); }
FileLocation implements Location { @Deprecated public static FileLocation ofShared(String relativePath) { String prop = System.getProperty(PROP_SHARED_DIR); return ofShared(relativePath, prop != null ? prop : System.getenv(ENV_SHARED_DIR)); } private  FileLocation(File file); static FileLocation of(File file); static FileLocation of(String path); static FileLocation of(URL url); static ResourceLocation ofClasspath(String pathStartingWithSlash); static FileLocation byWildcardFilename(File directory, String wildcardFilename); static FileLocation byWildcardMavenFilename(File directory, String wildcardFilename); @Deprecated static FileLocation ofShared(String relativePath); File getFile(); @Override boolean equals(Object o); @Override int hashCode(); @Override String toString();  }