MCPcopy Index your code
hub / github.com/davidgiven/luje / createNewFile

Method createNewFile

lib/java/io/File.java:1222–1239  ·  view source on GitHub ↗

Creates a new, empty file on the file system according to the path information stored in this file. @return true if the file has been created, false if it already exists. @throws IOException if an I/O error occurs or the directory does not exist where

()

Source from the content-addressed store, hash-verified

1220 * access for this file.
1221 */
1222 public boolean createNewFile() throws IOException {
1223// SecurityManager security = System.getSecurityManager();
1224// if (security != null) {
1225// security.checkWrite(path);
1226// }
1227 if (0 == path.length()) {
1228 throw new IOException(Messages.getString("luni.B3")); //$NON-NLS-1$
1229 }
1230 int result = newFileImpl(properPath(true));
1231 switch (result) {
1232 case 0:
1233 return true;
1234 case 1:
1235 return false;
1236 default:
1237 throw new IOException(Messages.getString("luni.B4", path)); //$NON-NLS-1$
1238 }
1239 }
1240
1241 private native int newFileImpl(byte[] filePath);
1242

Callers 1

createTempFileMethod · 0.95

Calls 4

getStringMethod · 0.95
newFileImplMethod · 0.95
properPathMethod · 0.95
lengthMethod · 0.65

Tested by

no test coverage detected