
delete(Path path): This is a void method and simply deletes the file from specified path.createTempFile(String prefix, String suffix, FileAttribute… attrs): This method creates a temporary file at default temporary-file directory and generates the file name using given prefix and suffix and returns the path of newly created file.createTempFile(Path dir, String prefix, String suffix, FileAttribute… attrs): This method creates a temporary file at specified directory and generates the file name using given prefix and suffix and returns the path of newly created file.
It will return the path of newly created temporary directory which is associated with the default File System.
createTempDirectory(String prefix, FileAttribute… attrs): This method creates a Temporary directory in the default temporary-file directory and generate the name of directory using given prefix. It will return the path of newly created temporary directory. createTempDirectory(Path dir, String prefix, FileAttribute… attrs): This method creates a Temporary directory using given path and it will generate the name of directory using given prefix. If file is already exists then it will throw. createFile(Path path, FileAttribute… attrs): This method creates a new empty file using given path and returns path of newly created file if it creates it successfully. If directory is already exists then it will throw. createDirectory(Path dir, FileAttribute… attrs): This method creates a directory using given path, if it creates directory successfully it will returns the path of the created directory. FileAttribute is an optional parameter to set automatically when creating the nonexistent directories and it returns the path of created directory. This method will not throw an exception if the directory could not be created because it already exists. createDirectories(Path dir, FileAttribute… attrs): This method creates a directories using given path by creating all nonexistent parent directories first. copy(Path source, Path target, CopyOption… options): This method copies given source file to specified target file and it returns path of target file. copy(Path source, OutputStream out): This method copies all bytes from specified source file to given output stream and it returns number of bytes read or written as long value. copy(InputStream in, Path target, CopyOption… options): This method copies all bytes from specified input stream to specified target file and it returns number of bytes read or written as long value.