tuweni / org.apache.tuweni.io.file / Files / createFileIfMissing

createFileIfMissing

static fun createFileIfMissing(path: Path!, vararg attrs: FileAttribute<*>!): Boolean (source)

Create a file, if it does not already exist.

Parameters

path - Path!: The path to the file to create.

attrs - FileAttribute<*>!: An optional list of file attributes to set atomically when creating the file.

Exceptions

IOException - If an I/O error occurs or the parent directory does not exist.

Return
Boolean: true if the file was created.