diff --git a/brut.j.dir/src/main/java/brut/directory/ChangesWrapperDirectory.java b/brut.j.dir/src/main/java/brut/directory/ChangesWrapperDirectory.java deleted file mode 100644 index 8ce6da6c..00000000 --- a/brut.j.dir/src/main/java/brut/directory/ChangesWrapperDirectory.java +++ /dev/null @@ -1,127 +0,0 @@ -/** - * Copyright (C) 2017 Ryszard Wiśniewski - * Copyright (C) 2017 Connor Tumbleson - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ -//package brut.directory; -// -//import java.io.InputStream; -//import java.io.OutputStream; -//import java.util.LinkedHashSet; -//import java.util.Map; -//import java.util.Set; -// -//public class ChangesWrapperDirectory implements Directory { -// private Directory mOriginal; -// private Directory mChanges; -// private Set mRemoved; -// -// public ChangesWrapperDirectory(Directory original, Directory changes) { -// this(original, changes, new LinkedHashSet()); -// } -// -// public ChangesWrapperDirectory(Directory original, Directory changes, -// Set removed) { -// super(); -// mOriginal = original; -// mChanges = changes; -// mRemoved = removed; -// } -// -// public Directory getOriginal() { -// return mOriginal; -// } -// -// public Directory getChanges() { -// return mChanges; -// } -// -// public Set getRemoved() { -// return mRemoved; -// } -// -// @Override -// public boolean containsDir(String path) { -// return ! getRemoved().contains(path) && (getOriginal().containsDir(path) || getChanges().containsDir(path)); -// } -// -// @Override -// public boolean containsFile(String path) { -// return ! getRemoved().contains(path) && (getOriginal().containsFile(path) || getChanges().containsFile(path)); -// } -// -// @Override -// public Directory createDir(String path) throws PathAlreadyExists, -// DirectoryException { -// throw new UnsupportedOperationException(); -// } -// -// @Override -// public Directory getDir(String path) throws PathNotExist { -// throw new UnsupportedOperationException(); -// } -// -// @Override -// public Map getDirs() { -// return getDirs(false); -// } -// -// @Override -// public Map getDirs(boolean recursive) { -// throw new UnsupportedOperationException(); -// } -// -// @Override -// public InputStream getFileInput(String path) throws PathNotExist, -// DirectoryException { -// if (getRemoved().contains(path)) { -// throw new PathNotExist(path); -// } -// if (getChanges().containsFile(path)) { -// return getChanges().getFileInput(path); -// } -// return getOriginal().getFileInput(path); -// } -// -// @Override -// public OutputStream getFileOutput(String path) throws DirectoryException { -// getRemoved().remove(path); -// return getChanges().getFileOutput(path); -// } -// -// @Override -// public Set getFiles() { -// return getFiles(false); -// } -// -// @Override -// public Set getFiles(boolean recursive) { -// Set files = new LinkedHashSet(getOriginal().getFiles(recursive)); -// files.addAll(getChanges().getFiles(recursive)); -// files.removeAll(getRemoved()); -// return files; -// } -// -// @Override -// public boolean removeFile(String path) { -// if(! containsFile(path)) { -// return false; -// } -// -// getChanges().removeFile(path); -// getRemoved().add(path); -// return true; -// } -// -//}