From 241e6a64bfe41e6247722e0e99a5d57bcc792315 Mon Sep 17 00:00:00 2001 From: Doug Coleman Date: Fri, 15 May 2009 22:31:50 -0500 Subject: [PATCH] call link-info instead of file-info, fix wonky spacing, name a constant --- basis/tools/files/files.factor | 13 ++++++++----- 1 file changed, 8 insertions(+), 5 deletions(-) diff --git a/basis/tools/files/files.factor b/basis/tools/files/files.factor index 146a119a63..29d3674b60 100755 --- a/basis/tools/files/files.factor +++ b/basis/tools/files/files.factor @@ -74,9 +74,9 @@ M: object file-spec>string ( file-listing spec -- string ) : list-files-slow ( listing-tool -- array ) [ path>> ] [ sort>> ] [ specs>> ] tri '[ - [ dup name>> file-info file-listing boa ] map - _ [ sort-by ] when* - [ _ [ file-spec>string ] with map ] map + [ dup name>> link-info file-listing boa ] map + _ [ sort-by ] when* + [ _ [ file-spec>string ] with map ] map ] with-directory-entries ; inline : list-files ( listing-tool -- array ) @@ -115,11 +115,14 @@ SYMBOLS: +device-name+ +mount-point+ +type+ [ file-systems-info ] [ [ unparse ] map ] bi prefix simple-table. ; -: file-systems. ( -- ) +CONSTANT: default-file-systems-spec { +device-name+ +available-space+ +free-space+ +used-space+ +total-space+ +percent-used+ +mount-point+ - } print-file-systems ; + } + +: file-systems. ( -- ) + default-file-systems-spec print-file-systems ; { { [ os unix? ] [ "tools.files.unix" ] }