Home | History | Annotate | Download | only in internal

Lines Matching refs:file

5  * you may not use this file except in compliance with the License.
19 import java.io.File;
31 private final Set<File> writeFaults = new LinkedHashSet<>();
37 public void setFaulty(File file, boolean faulty) {
39 writeFaults.add(file);
41 writeFaults.remove(file);
45 @Override public Source source(File file) throws FileNotFoundException {
46 return delegate.source(file);
49 @Override public Sink sink(File file) throws FileNotFoundException {
50 return new FaultySink(delegate.sink(file), file);
53 @Override public Sink appendingSink(File file) throws FileNotFoundException {
54 return new FaultySink(delegate.appendingSink(file), file);
57 @Override public void delete(File file) throws IOException {
58 delegate.delete(file);
61 @Override public boolean exists(File file) throws IOException {
62 return delegate.exists(file);
65 @Override public long size(File file) {
66 return delegate.size(file);
69 @Override public void rename(File from, File to) throws IOException {
73 @Override public void deleteContents(File directory) throws IOException {
78 private final File file;
80 public FaultySink(Sink delegate, File file) {
82 this.file = file;
86 if (writeFaults.contains(file)) throw new IOException("boom!");