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 faildb4
parent
1bb89d0fd9
commit
4c0d73da3c
|
@ -34,7 +34,7 @@ DEFER: copy-tree-into
|
||||||
{
|
{
|
||||||
{ +symbolic-link+ [ copy-link ] }
|
{ +symbolic-link+ [ copy-link ] }
|
||||||
{ +directory+ [ '[ [ _ copy-tree-into ] each ] with-directory-files ] }
|
{ +directory+ [ '[ [ _ copy-tree-into ] each ] with-directory-files ] }
|
||||||
[ drop copy-file-and-info ]
|
[ drop copy-file ]
|
||||||
} case ;
|
} case ;
|
||||||
|
|
||||||
: copy-tree-into ( from to -- )
|
: copy-tree-into ( from to -- )
|
||||||
|
|
|
@ -2,7 +2,7 @@
|
||||||
! See http://factorcode.org/license.txt for BSD license.
|
! See http://factorcode.org/license.txt for BSD license.
|
||||||
USING: accessors alien.c-types alien.data alien.strings
|
USING: accessors alien.c-types alien.data alien.strings
|
||||||
combinators continuations destructors fry io io.backend
|
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
|
io.encodings.utf8 io.files io.pathnames io.files.types kernel
|
||||||
math.bitwise sequences system unix unix.stat vocabs.loader
|
math.bitwise sequences system unix unix.stat vocabs.loader
|
||||||
classes.struct unix.ffi literals libc vocabs
|
classes.struct unix.ffi literals libc vocabs
|
||||||
|
|
|
@ -1,7 +1,7 @@
|
||||||
! Copyright (C) 2008 Doug Coleman, Eduardo Cavazos.
|
! Copyright (C) 2008 Doug Coleman, Eduardo Cavazos.
|
||||||
! See http://factorcode.org/license.txt for BSD license.
|
! See http://factorcode.org/license.txt for BSD license.
|
||||||
USING: accessors kernel system sequences combinators
|
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
|
IN: io.files.info
|
||||||
|
|
||||||
! File info
|
! File info
|
||||||
|
@ -29,7 +29,3 @@ HOOK: file-system-info os ( path -- file-system-info )
|
||||||
{ [ os unix? ] [ "io.files.info.unix" ] }
|
{ [ os unix? ] [ "io.files.info.unix" ] }
|
||||||
{ [ os windows? ] [ "io.files.info.windows" ] }
|
{ [ os windows? ] [ "io.files.info.windows" ] }
|
||||||
} cond require
|
} cond require
|
||||||
|
|
||||||
HOOK: copy-file-and-info os ( from to -- )
|
|
||||||
|
|
||||||
M: object copy-file-and-info copy-file ;
|
|
||||||
|
|
|
@ -2,7 +2,7 @@
|
||||||
! See http://factorcode.org/license.txt for BSD license.
|
! See http://factorcode.org/license.txt for BSD license.
|
||||||
USING: accessors alien.c-types alien.data arrays calendar
|
USING: accessors alien.c-types alien.data arrays calendar
|
||||||
calendar.unix classes.struct combinators
|
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
|
io.files.info io.files.types kernel literals math math.bitwise
|
||||||
sequences specialized-arrays strings system unix unix.ffi
|
sequences specialized-arrays strings system unix unix.ffi
|
||||||
unix.groups unix.stat unix.time unix.users vocabs ;
|
unix.groups unix.stat unix.time unix.users vocabs ;
|
||||||
|
@ -185,9 +185,6 @@ CONSTANT: ALL-EXECUTE 0o0000111
|
||||||
: remove-file-permissions ( path n -- )
|
: remove-file-permissions ( path n -- )
|
||||||
over file-permissions [ bitnot ] dip bitand set-file-permissions ;
|
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
|
<PRIVATE
|
||||||
|
|
||||||
: timestamp>timeval ( timestamp -- timeval )
|
: timestamp>timeval ( timestamp -- timeval )
|
||||||
|
|
Loading…
Reference in New Issue