Skip to content

Commit d5c90fd

Browse files
committed
introduce FileFlag
1 parent ec61765 commit d5c90fd

1 file changed

Lines changed: 15 additions & 0 deletions

File tree

Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,15 @@
1+
package org.comroid.api.io;
2+
3+
import java.io.File;
4+
5+
public final class FileFlag {
6+
public static boolean consume(File file) {
7+
if (!file.isAbsolute())
8+
return consume(file.getAbsoluteFile());
9+
return file.exists() && file.delete();
10+
}
11+
12+
private FileFlag() {
13+
throw new UnsupportedOperationException();
14+
}
15+
}

0 commit comments

Comments
 (0)