Note: this method should not be used for file-locking, as the resulting protocol cannot be made to work reliably. The {@link java.nio.channels.FileLock FileLock}facility should be used instead.
@return true
if the named file does not exist and wassuccessfully created; false
if the named file already exists
@throws IOException If an I/O error occurred
@throws SecurityException If a security manager exists and its {@link java.lang.SecurityManager#checkWrite(java.lang.String)}
method denies write access to the file
@since 1.2
false
. Otherwise, if the file is created successfully, the result is true
. An IOException will be thrown if the directory to contain this file does not exist.
@return true
if this File was created, false
otherwise.
@throws IOException if an I/O error occurs or the directory does not exist.
@see java.lang.SecurityManager#checkWrite(FileDescriptor)
true
if the named file does not exist and wassuccessfully created; false
if the named file already exists
@throws IOException If an I/O error occurred
@deprecated use instead #createFile(boolean)
|
|
|
|
|
|
|
|
|
|
|
|