0

I need to write an application which detect the disk available space change. If the available space is changed, the chart should be also automatically updated.

Is there any system-level event thrown to the application when the disable available capacity change? The application is allowed to be aware of such a change by adding event listenr.

I found there is no API provided for such purpose on both Linux and Windows. Without this kind of API, it is wasteful to poll the disk info at a regular interval instead of listening change event.

Thanks in advance.

4

1 回答 1

1

It looks like you've answered your own question there. But polling for disk free space is not an expensive or wasteful operation - just call GetDiskFreeSpace every 30 seconds or so.

于 2012-06-18T02:42:36.487 回答