MCPcopy Create free account
hub / github.com/apache/pig / deleteDirectory

Method deleteDirectory

test/org/apache/pig/test/Util.java:1036–1049  ·  view source on GitHub ↗
(File path)

Source from the content-addressed store, hash-verified

1034 }
1035
1036 static public boolean deleteDirectory(File path) {
1037 if(path.exists()) {
1038 File[] files = path.listFiles();
1039 for(int i=0; i<files.length; i++) {
1040 if(files[i].isDirectory()) {
1041 deleteDirectory(files[i]);
1042 }
1043 else {
1044 files[i].delete();
1045 }
1046 }
1047 }
1048 return(path.delete());
1049 }
1050
1051 /**
1052 * @param pigContext

Callers 15

tearDownMethod · 0.95
setupMethod · 0.95
cleanupMethod · 0.95
setupMethod · 0.95
cleanupMethod · 0.95
setupMethod · 0.95
cleanupMethod · 0.95
tearDownMethod · 0.95
tearDownMethod · 0.95
tearDownMethod · 0.95
testParseInputScriptMethod · 0.95

Calls 3

existsMethod · 0.65
deleteMethod · 0.65
isDirectoryMethod · 0.45

Tested by

no test coverage detected