コード例 #1
0
  public boolean containsFile(String fileName) {
    if (fileName == null) return false;

    for (StoreLocation location : this.readLocations) {
      java.io.File dir = location.getFile();
      java.io.File file;

      if (fileName.startsWith(dir.getAbsolutePath())) file = new java.io.File(fileName);
      else file = makeAbsoluteFile(dir, fileName);

      if (file.exists()) return true;
    }

    return false;
  }
コード例 #2
0
 protected static String makeAbsolutePath(java.io.File dir, String fileName) {
   return dir.getAbsolutePath() + "/" + fileName;
 }
コード例 #3
0
 protected static java.io.File makeAbsoluteFile(java.io.File file, String fileName) {
   return new java.io.File(file.getAbsolutePath() + "/" + fileName);
 }