 : resource-exists? ( path -- ? )
     ?resource-path exists? ;
 
-: temp-directory ( -- path )
-    "temp" resource-path
-    dup exists? not
-      [ dup make-directory ]
-    when ;
-
-: temp-file ( name -- path ) temp-directory swap path+ ;
-
 ! Pathname presentations
 TUPLE: pathname string ;
 

io.encodings.binary ;
IN: io.files

HOOK: cd io-backend ( path -- )

HOOK: cwd io-backend ( -- path )

HOOK: (file-reader) io-backend ( path -- stream )

HOOK: (file-writer) io-backend ( path -- stream )

: <file-appender> ( path encoding -- stream )
    swap (file-appender) swap <encoder> ;

HOOK: rename-file io-backend ( from to -- )

! Pathnames
: path-separator? ( ch -- ? ) windows? "/\\" "/" ? member? ;
