call link-info instead of file-info, fix wonky spacing, name a constant
parent
7c1f4e8839
commit
241e6a64bf
|
@ -74,7 +74,7 @@ M: object file-spec>string ( file-listing spec -- string )
|
||||||
|
|
||||||
: list-files-slow ( listing-tool -- array )
|
: list-files-slow ( listing-tool -- array )
|
||||||
[ path>> ] [ sort>> ] [ specs>> ] tri '[
|
[ path>> ] [ sort>> ] [ specs>> ] tri '[
|
||||||
[ dup name>> file-info file-listing boa ] map
|
[ dup name>> link-info file-listing boa ] map
|
||||||
_ [ sort-by ] when*
|
_ [ sort-by ] when*
|
||||||
[ _ [ file-spec>string ] with map ] map
|
[ _ [ file-spec>string ] with map ] map
|
||||||
] with-directory-entries ; inline
|
] with-directory-entries ; inline
|
||||||
|
@ -115,11 +115,14 @@ SYMBOLS: +device-name+ +mount-point+ +type+
|
||||||
[ file-systems-info ]
|
[ file-systems-info ]
|
||||||
[ [ unparse ] map ] bi prefix simple-table. ;
|
[ [ unparse ] map ] bi prefix simple-table. ;
|
||||||
|
|
||||||
: file-systems. ( -- )
|
CONSTANT: default-file-systems-spec
|
||||||
{
|
{
|
||||||
+device-name+ +available-space+ +free-space+ +used-space+
|
+device-name+ +available-space+ +free-space+ +used-space+
|
||||||
+total-space+ +percent-used+ +mount-point+
|
+total-space+ +percent-used+ +mount-point+
|
||||||
} print-file-systems ;
|
}
|
||||||
|
|
||||||
|
: file-systems. ( -- )
|
||||||
|
default-file-systems-spec print-file-systems ;
|
||||||
|
|
||||||
{
|
{
|
||||||
{ [ os unix? ] [ "tools.files.unix" ] }
|
{ [ os unix? ] [ "tools.files.unix" ] }
|
||||||
|
|
Loading…
Reference in New Issue