开发者

How to get disk usage statistics for remote network share?

开发者 https://www.devze.com 2023-01-15 11:17 出处:网络
If I have a network share say \\\\myfileserver\\documents, can I find out programmatically how much disk space it is using (used/free space) using any API of some sort?

If I have a network share say \\myfileserver\documents, can I find out programmatically how much disk space it is using (used/free space) using any API of some sort?

Please note it could be hosted by samba or it could be on a san storage device which means I won't be able to install anything on that machine to check the local disk usage and report it via some web service.

I'开发者_运维技巧m writing code in .NET but I'm sure that doesn't matter.


GetDiskFreeSpaceEx() explicitly documents how you need to pass a UNC path: include the trailing backslash.

0

精彩评论

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