io.files.info: fix circularity

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
db4
Joe Groff 2011-11-28 19:37:01 -08:00
parent 1bb89d0fd9
commit 4c0d73da3c
4 changed files with 4 additions and 11 deletions

View File

@ -34,7 +34,7 @@ DEFER: copy-tree-into
{
{ +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 -- )

View File

@ -2,7 +2,7 @@
! 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

View File

@ -1,7 +1,7 @@
! 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
@ -29,7 +29,3 @@ HOOK: file-system-info os ( path -- file-system-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 ;

View File

@ -2,7 +2,7 @@
! 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 ;
@ -185,9 +185,6 @@ CONSTANT: ALL-EXECUTE 0o0000111
: 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 )