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

Prev:unique-file ( prefix suffix -- path )
Next:unique-directory ( -- path )


Vocabulary
io.files.unique

Inputs
prefixa string
suffixa string
quota quotation with stack effect ( ..a path -- ..b )


Outputs
None

Word description
Creates a file with unique-file and calls the quotation with the path name on the stack.

Notes
The unique file will be deleted after calling this word, even if an error is thrown in the quotation.

See also
unique-file

Definition


:: cleanup-unique-file
( ..a prefix suffix quot: ( ..a path -- ..b ) -- ..b )
prefix suffix unique-file :> path
[ path quot call ] [ path delete-file ] finally ; inline