]> gitweb.factorcode.org Git - factor.git/commitdiff
call link-info instead of file-info, fix wonky spacing, name a constant
authorDoug Coleman <erg@jobim.local>
Sat, 16 May 2009 03:31:50 +0000 (22:31 -0500)
committerDoug Coleman <erg@jobim.local>
Sat, 16 May 2009 03:31:50 +0000 (22:31 -0500)
basis/tools/files/files.factor

index 146a119a631ce0f745336c17d58e4f64662b4a08..29d3674b60a7761d0055c82732f4bb5dde09bd62 100755 (executable)
@@ -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" ] }