makeDir (Function)

Signature: makeDir(path: string) -> Result<int, Error>

Description: Creates one directory, idempotently: an existing directory is success. Returns Result<int, Error>.

Parameters

  • path (string): Path of the directory to create

Returns: Result<int, Error>

Example

match makeDir("out/notes") {
    Success { value } => print("ready")
    Error { message } => print(message)
}
match makeDir "out/notes"
    Success value => print "ready"
    Error message => print message