try to add winnt space-free

Doug Coleman 2008-10-21 02:27:39 -05:00
parent dfef28e715
commit ca17c11270
1 changed files with 14 additions and 0 deletions

View File

@ -246,6 +246,20 @@ M: winnt file-info ( path -- info )
M: winnt link-info ( path -- info )
file-info ;
TUPLE: winnt-file-system-info < file-system-info
total-bytes total-free-bytes ;
M: winnt file-system-info ( path -- file-system-info )
normalize-path
"ULARGE_INTEGER" <c-object>
"ULARGE_INTEGER" <c-object>
"ULARGE_INTEGER" <c-object>
[ GetDiskFreeSpaceEx ] 3keep
\ winnt-file-system-info new
swap >>total-free-bytes
swap >>total-bytes
swap >>free-space ;
: file-times ( path -- timestamp timestamp timestamp )
[
normalize-path open-existing &dispose handle>>