MCPcopy Create free account
hub / github.com/SeleniumHQ/selenium / delete

Method delete

java/src/org/openqa/selenium/io/FileHandler.java:90–103  ·  view source on GitHub ↗
(File toDelete)

Source from the content-addressed store, hash-verified

88 }
89
90 public static boolean delete(File toDelete) {
91 boolean deleted = true;
92
93 if (toDelete.isDirectory()) {
94 File[] children = toDelete.listFiles();
95 if (children != null) {
96 for (File child : children) {
97 deleted &= child.canWrite() && delete(child);
98 }
99 }
100 }
101
102 return deleted && toDelete.canWrite() && toDelete.delete();
103 }
104
105 public static void copy(File from, File to) throws IOException {
106 if (!from.exists()) {

Callers 6

deleteDownloadedFileMethod · 0.95
deleteTempDirMethod · 0.95
deleteTemporaryFilesMethod · 0.95
createTempDirMethod · 0.45
deleteBaseDirMethod · 0.45

Calls 1

isDirectoryMethod · 0.65