openFile

fun openFile(    path: Path,     options: Set<OpenOption>,     vararg attributes: FileAttribute<*>): AsynchronousFileChannel

Open an asynchronous file channel for the specified path.

Return

An asynchronous file channel.

Parameters

path

A path.

options
attributes

The file attributes (for newly created files only).

Throws

If the combination of options is invalid.

If an option is invalid for the specified path.

If the security manager denies permission to complete the operation.

If the open fails for any reason.