io.files.unique: change cleanup-unique-file quot stack effect.
parent
20883fb21a
commit
50759f4bc6
|
@ -22,7 +22,7 @@ HELP: unique-file
|
|||
{ unique-file cleanup-unique-file } related-words
|
||||
|
||||
HELP: cleanup-unique-file
|
||||
{ $values { "prefix" string } { "suffix" string } { "quot" { $quotation ( path -- ) } } }
|
||||
{ $values { "prefix" string } { "suffix" string } { "quot" { $quotation ( ..a path -- ..b ) } } }
|
||||
{ $description "Creates a file with " { $link 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." } ;
|
||||
|
||||
|
|
|
@ -36,7 +36,7 @@ PRIVATE>
|
|||
dup touch-unique-file
|
||||
] unique-retries get retry absolute-path ;
|
||||
|
||||
:: cleanup-unique-file ( prefix suffix quot: ( path -- ) -- )
|
||||
:: cleanup-unique-file ( ..a prefix suffix quot: ( ..a path -- ..b ) -- ..b )
|
||||
prefix suffix unique-file :> path
|
||||
[ path quot call ] [ path delete-file ] [ ] cleanup ; inline
|
||||
|
||||
|
|
Loading…
Reference in New Issue