unique-file ( prefix suffix -- path )
Unique files

Next:cleanup-unique-file ( ..a prefix suffix quot: ( ..a path -- ..b ) -- ..b )


Vocabulary
io.files.unique

Inputs
prefixa string
suffixa string


Outputs
patha pathname string


Word description
Creates a file that is guaranteed not to exist in the current-directory. The file name is composed of a prefix, a unique-length number of random digits and letters, and the suffix. Returns the full pathname.

Errors
Throws an error if a new unique file cannot be created after a unique-retries number of tries. The most likely error is incorrect directory permissions on the current-directory.

See also
cleanup-unique-file

Definition