@Override public void deleteFileAtPath(Path path) throws IOException { if (exists(path)) { rmFile(path); } else { throw new NoSuchFileException(path.toString()); } }
@Override public boolean deleteFileAtPathIfExists(Path path) throws IOException { if (exists(path)) { rmFile(path); return true; } else { return false; } }
@Override public void createSymLink(Path symLink, Path realFile, boolean force) throws IOException { if (!force) { if (fileContents.containsKey(symLink) || directories.contains(symLink)) { throw new FileAlreadyExistsException(symLink.toString()); } } else { rmFile(symLink); deleteRecursivelyIfExists(symLink); } symLinks.put(symLink, realFile); }