create

abstract suspend fun create(path: Path, type: FileMetadata.FileType)(source)

Creates a new file or directory denoted by the path using the specified type. Parent directories will be created if they don't exist.

Parameters

path

The path of the new file or directory.

type

The type (file or directory) to create.

See also

Throws

IOException

or its inheritor if the path already exists, or path is invalid (e.g., contains reserved characters), or if any other I/O error occurs.