io.files: temp-file
parent
b2cc6914b6
commit
41ca620271
|
@ -154,3 +154,11 @@ M: pathname <=> [ pathname-string ] compare ;
|
||||||
|
|
||||||
: with-file-appender ( path quot -- )
|
: with-file-appender ( path quot -- )
|
||||||
>r <file-appender> r> with-stream ; inline
|
>r <file-appender> r> with-stream ; inline
|
||||||
|
|
||||||
|
: temp-dir ( -- path )
|
||||||
|
"temp" resource-path
|
||||||
|
dup exists? not
|
||||||
|
[ dup make-directory ]
|
||||||
|
when ;
|
||||||
|
|
||||||
|
: temp-file ( name -- path ) temp-dir swap path+ ;
|
Loading…
Reference in New Issue