Remove the undocumented and redundant "copy-file-and-info" word, since "copy-file" does the same thing, and the circular dependency on "io.directories" was causing some deploys to fail
{
{ +symbolic-link+ [ copy-link ] }
{ +directory+ [ '[ [ _ copy-tree-into ] each ] with-directory-files ] }
- [ drop copy-file-and-info ]
+ [ drop copy-file ]
} case ;
: copy-tree-into ( from to -- )
! See http://factorcode.org/license.txt for BSD license.
USING: accessors alien.c-types alien.data alien.strings
combinators continuations destructors fry io io.backend
-io.directories io.encodings.binary
+io.directories io.encodings.binary io.files.info.unix
io.encodings.utf8 io.files io.pathnames io.files.types kernel
math.bitwise sequences system unix unix.stat vocabs.loader
classes.struct unix.ffi literals libc vocabs
! Copyright (C) 2008 Doug Coleman, Eduardo Cavazos.
! See http://factorcode.org/license.txt for BSD license.
USING: accessors kernel system sequences combinators
-vocabs vocabs.loader io.files.types io.directories math ;
+vocabs vocabs.loader io.files.types math ;
IN: io.files.info
! File info
{ [ os unix? ] [ "io.files.info.unix" ] }
{ [ os windows? ] [ "io.files.info.windows" ] }
} cond require
-
-HOOK: copy-file-and-info os ( from to -- )
-
-M: object copy-file-and-info copy-file ;
! See http://factorcode.org/license.txt for BSD license.
USING: accessors alien.c-types alien.data arrays calendar
calendar.unix classes.struct combinators
-combinators.short-circuit io.backend io.directories
+combinators.short-circuit io.backend
io.files.info io.files.types kernel literals math math.bitwise
sequences specialized-arrays strings system unix unix.ffi
unix.groups unix.stat unix.time unix.users vocabs ;
: remove-file-permissions ( path n -- )
over file-permissions [ bitnot ] dip bitand set-file-permissions ;
-M: unix copy-file-and-info ( from to -- )
- [ copy-file ] [ swap file-permissions set-file-permissions ] 2bi ;
-
<PRIVATE
: timestamp>timeval ( timestamp -- timeval )