write

fun write(bytes: ByteArray, name: String): File(source)

Writes a file beneath this directory, creating parent folders.

Return

The new file.

Parameters

bytes

The contents to write.

name

A relative path; paths escaping the directory are rejected.

Throws

for an empty, absolute, or escaping path.

when the file cannot be written.


fun write(text: String, name: String): File(source)

Writes UTF-8 text beneath this directory, creating parent folders.

Return

The new file.

Parameters

text

The contents to write.

name

A relative path; paths escaping the directory are rejected.