mounted* -> mounted
parent
b4b02d29fa
commit
89e9fa8b6b
|
@ -123,10 +123,11 @@ block-size io-size blocks blocks-free blocks-available files
|
|||
files-free file-system-id owner type flags filesystem-subtype
|
||||
file-system-type-name mount-from ;
|
||||
|
||||
M: macosx mounted* ( -- array )
|
||||
M: macosx mounted ( -- array )
|
||||
f <void*> dup 0 getmntinfo64 dup io-error
|
||||
[ *void* ] dip
|
||||
"statfs64" heap-size [ * memory>byte-array ] keep group ;
|
||||
"statfs64" heap-size [ * memory>byte-array ] keep group
|
||||
[ >file-system-info ] map ;
|
||||
|
||||
M: macosx >file-system-info ( byte-array -- file-system-info )
|
||||
[ \ macosx-file-system-info new ] dip
|
||||
|
|
|
@ -9,19 +9,11 @@ blocks-available files files-free file-system-id owner type
|
|||
flags filesystem-subtype file-system-type-name mount-on
|
||||
mount-from ;
|
||||
|
||||
HOOK: mounted* os ( -- array )
|
||||
HOOK: >mounted os ( byte-array -- mounted )
|
||||
|
||||
TUPLE: file-system-info root-directory total-free-size total-size ;
|
||||
|
||||
HOOK: >file-system-info os ( struct -- statfs )
|
||||
|
||||
: mounted ( -- array ) mounted* [ >file-system-info ] map ;
|
||||
|
||||
: mounted-drive ( path -- mounted/f )
|
||||
mounted
|
||||
[ [ mount-on>> ] bi@ <=> ] sort <reversed>
|
||||
[ mount-on>> head? ] with find nip ;
|
||||
HOOK: mounted os ( -- array )
|
||||
|
||||
os {
|
||||
{ linux [ "unix.statfs.linux" require ] }
|
||||
|
|
Loading…
Reference in New Issue