12345678910111213141516171819202122232425262728293031323334353637383940 | '\" t
.\" Copyright (c) 2026 Bruce Hill
.\" All rights reserved.
.\"
.TH Path.create_directory 3 2026-09-01 "Tomo man-pages"
.SH NAME
Path.create_directory \- make a directory
.SH LIBRARY
Tomo Standard Library
.SH SYNOPSIS
.nf
.BI Path.create_directory\ :\ func(path:\ Path,\ permissions:\ Int32\ =\ Int32(0o755),\ recursive:\ Bool\ =\ yes\ ->\ Result)
.fi
.SH DESCRIPTION
Creates a new directory at the specified path with the given permissions. If any of the parent directories do not exist, they will be created as needed.
.SH ARGUMENTS
.TS
allbox;
lb lb lbx lb
l l l l.
Name Type Description Default
path Path The path of the directory to create. -
permissions Int32 The permissions to set on the new directory. Int32(0o755)
recursive Bool If set to \fByes\fR, then recursively create any parent directories if they don't exist, otherwise fail if the parent directory does not exist. When set to \fByes\fR, this function behaves like \fBmkdir -p\fR. yes
.TE
.SH RETURN
Either `Success` or `Failure{reason}`.
.SH NOTES
A directory that already exists is a success, which is what makes this safe to call when another process may be creating the same directory. Something that exists but is not a directory is a failure.
.SH EXAMPLES
.EX
(./new_directory).create_directory()!
.EE
.SH SEE ALSO
.BR Tomo-Path (3)
|