Ejemplo n.º 1
0
  private String sourceURL(String url) {
    File baseDirectory = dataDir().getResourceLoader().getBaseDirectory();

    File file = Files.url(baseDirectory, url);
    if (file != null) {
      return Paths.convert(baseDirectory, file);
    }
    return url;
  }
Ejemplo n.º 2
0
  private String source(URL url) {
    File baseDirectory = dataDir().getResourceLoader().getBaseDirectory();

    if (url.getProtocol().equals("file")) {
      File file = Files.url(baseDirectory, url.toExternalForm());
      if (file != null && !file.isAbsolute()) {
        return Paths.convert(baseDirectory, file);
      }
    }
    return url.toExternalForm();
  }
Ejemplo n.º 3
0
  private String sourceFile(String file) {
    File baseDirectory = dataDir().getResourceLoader().getBaseDirectory();

    File f = new File(file);
    return f.isAbsolute() ? file : Paths.convert(baseDirectory, f);
  }
Ejemplo n.º 4
0
 private String source(File file) {
   File baseDirectory = dataDir().getResourceLoader().getBaseDirectory();
   return file.isAbsolute() ? file.toString() : Paths.convert(baseDirectory, file);
 }