Creates a new directory on the remote server. This method will throw an exception if the directory already exists. To create directories and disregard any errors use the mkdirs method.
true if the directory was created,false otherwise.
@see #getPath
@see java.lang.SecurityManager#checkWrite(FileDescriptor)
smb://workgroup/, smb://server/, or smb://server/share/ URLs because workgroups, servers, and shares cannot be dynamically created (although in the future it may be possible to create shares).
@throws SmbException
true if and only if the directory wascreated; false otherwise
@throws SecurityException If a security manager exists and its {@link java.lang.SecurityManager#checkWrite(java.lang.String)} method does not permit the named directory to be created
For the directory to be created, it cannot exist already (either as a file or a directory), and any parent directories must exist. @return {@code true} if the directory was created, {@code false}otherwise.
dir alreadyexists
@throws FileNotFoundException If parent of dir does not existand createParent is false
@throws ParentNotDirectoryException If parent of dir is not adirectory
@throws UnsupportedFileSystemException If file system for diris not supported
@throws IOException If an I/O error occurredExceptions applicable to file systems accessed over RPC:
@throws RpcClientException If an exception occurred in the RPC client
@throws UnexpectedServerException If server implementation throws undeclared exception to RPC server RuntimeExceptions:
@throws InvalidPathException If path dir is not valid
The {@link EFS#SHALLOW} option flag indicates howthis method deals with creation when the parent directory does not exist. If the SHALLOW flag is present, this method will fail if the parent directory does not exist. When the flag is not present, all necessary parent directories are also created.
null if progressreporting and cancellation are not desired
@return This directory
@exception CoreException if this method fails. Reasons include:true if and only if the directory wascreated; false otherwise
@deprecated use #createDirectory(boolean)
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |