Implement copy-file on Windows
parent
90731836af
commit
aaa493ebd2
|
@ -97,7 +97,9 @@ TUPLE: no-parent-directory path ;
|
|||
] }
|
||||
} cond drop ;
|
||||
|
||||
: copy-file ( from to -- )
|
||||
HOOK: copy-file io-backend ( from to -- )
|
||||
|
||||
M: object copy-file
|
||||
dup parent-directory make-directories
|
||||
<file-writer> [
|
||||
stdio get swap
|
||||
|
|
|
@ -116,6 +116,10 @@ M: windows-io delete-file ( path -- )
|
|||
normalize-pathname
|
||||
DeleteFile win32-error=0/f ;
|
||||
|
||||
M: windows-io copy-file ( from to -- )
|
||||
normalize-pathname
|
||||
f CopyFile win32-error=0/f ;
|
||||
|
||||
M: windows-io make-directory ( path -- )
|
||||
normalize-pathname
|
||||
f CreateDirectory win32-error=0/f ;
|
||||
|
|
Loading…
Reference in New Issue