MCPcopy Index your code
hub / github.com/SeleniumHQ/selenium / createDir

Method createDir

java/src/org/openqa/selenium/io/FileHandler.java:69–80  ·  view source on GitHub ↗
(File dir)

Source from the content-addressed store, hash-verified

67 }
68
69 public static boolean createDir(File dir) {
70 if ((dir.exists() || dir.mkdirs()) && dir.canWrite()) return true;
71
72 if (dir.exists()) {
73 FileHandler.makeWritable(dir);
74 return dir.canWrite();
75 }
76
77 // Iterate through the parent directories until we find that exists,
78 // then sink down.
79 return createDir(dir.getParentFile());
80 }
81
82 public static boolean makeWritable(File file) {
83 return file.canWrite() || file.setWritable(true);

Callers 7

writeToMethod · 0.95
unzipMethod · 0.95
unzipFileMethod · 0.95
copyDirMethod · 0.95
createTempDirMethod · 0.95

Calls 2

makeWritableMethod · 0.95
existsMethod · 0.80

Tested by

no test coverage detected