blob: fbab2f61ab9c7199630a744a421858c88dd30413 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
|
'\" t
.\" Copyright (c) 2025 Bruce Hill
.\" All rights reserved.
.\"
.TH Path.unique_directory 3 2025-04-30 "Tomo man-pages"
.SH NAME
Path.unique_directory \- create a directory with a unique name
.SH LIBRARY
Tomo Standard Library
.SH SYNOPSIS
.nf
.BI Path.unique_directory\ :\ func(path:\ Path\ ->\ Path)
.fi
.SH DESCRIPTION
Generates a unique directory path based on the given path. Useful for creating temporary directories.
.SH ARGUMENTS
.TS
allbox;
lb lb lbx lb
l l l l.
Name Type Description Default
path Path The base path for generating the unique directory. The last six letters of this path must be `XXXXXX`. -
.TE
.SH RETURN
A unique directory path after creating the directory.
.SH EXAMPLES
.EX
>> created := (/tmp/my-dir.XXXXXX).unique_directory()
= (/tmp/my-dir-AwoxbM/)
>> created.is_directory()
= yes
created.remove()
.EE
|