factor/basis/tools/files/windows/windows.factor

23 lines
658 B
Factor
Raw Normal View History

2008-11-14 01:25:00 -05:00
! Copyright (C) 2008 Doug Coleman.
! See http://factorcode.org/license.txt for BSD license.
USING: accessors calendar.format combinators io.files
kernel math.parser sequences splitting system tools.files
2008-12-16 03:51:57 -05:00
generalizations tools.files.private io.files.info ;
IN: tools.files.windows
2008-11-14 01:25:00 -05:00
2008-11-14 01:51:14 -05:00
<PRIVATE
M: windows file-spec>string ( file-listing spec -- string )
{
{ listing-datetime [ modified>> timestamp>ymdhms ] }
[ call-next-method ]
} case ;
2008-11-14 01:25:00 -05:00
M: windows (directory.) ( entries -- lines )
<listing-tool>
{ file-size file-datetime file-name } >>specs
{ { directory-entry>> name>> <=> } } >>sort
list-files ;
2008-11-14 01:51:14 -05:00
PRIVATE>