开发者

FInding the hard disk storage capacity programmatically

开发者 https://www.devze.com 2022-12-26 11:37 出处:网络
How do I find out the storage capa开发者_如何转开发city of my harddisk without using the OS functions like dir or ls?On windows:

How do I find out the storage capa开发者_如何转开发city of my harddisk without using the OS functions like dir or ls?


On windows:

Win32: GetDiskFreeSpaceEx

.NET: DriveInfo

If, for whatever reason, you still don't want to use those, you can send an IOCTL message direct to the disk driver.


statfs() unix system call is your friend (link points to BSD man page as used in Mac OS X).

0

精彩评论

暂无评论...
验证码 换一张
取 消