diff --git a/core/io/files/files.factor b/core/io/files/files.factor index 1824a47867..108ace4393 100755 --- a/core/io/files/files.factor +++ b/core/io/files/files.factor @@ -154,3 +154,11 @@ M: pathname <=> [ pathname-string ] compare ; : with-file-appender ( path quot -- ) >r 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+ ; \ No newline at end of file