file-systems. -> print-file-systems, file-systems. no longer takes a spec array

db4
Doug Coleman 2008-12-09 17:50:47 -06:00
parent 35117a0e49
commit a48df2fcd3
2 changed files with 6 additions and 3 deletions

View File

@ -7,5 +7,4 @@ IN: tools.files.tests
[ ] [ "" directory. ] unit-test [ ] [ "" directory. ] unit-test
[ ] [ ] [ file-systems. ] unit-test
[ { device-name free-space used-space total-space percent-used } file-systems. ] unit-test

View File

@ -58,10 +58,14 @@ percent-used percent-free ;
: file-systems-info ( spec -- seq ) : file-systems-info ( spec -- seq )
file-systems swap '[ _ [ file-system-spec ] with map ] map ; file-systems swap '[ _ [ file-system-spec ] with map ] map ;
: file-systems. ( spec -- ) : print-file-systems ( spec -- )
[ file-systems-info ] [ file-systems-info ]
[ [ unparse ] map ] bi prefix simple-table. ; [ [ unparse ] map ] bi prefix simple-table. ;
: file-systems. ( -- )
{ device-name free-space used-space total-space percent-used }
print-file-systems ;
{ {
{ [ os unix? ] [ "tools.files.unix" ] } { [ os unix? ] [ "tools.files.unix" ] }
{ [ os windows? ] [ "tools.files.windows" ] } { [ os windows? ] [ "tools.files.windows" ] }