Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Programmatically determining space available from UNC Path

Tags:

.net

winapi

wmi

Is there a programmatic API for determining available space on NAS storage from a UNC path? I looked through the WMI documentation and it wasn't clear that this is possible.

A code example and references to the relevant API calls would be much appreciated.

like image 454
LBushkin Avatar asked Nov 15 '22 13:11

LBushkin


1 Answers

In the windows API, GetFreeDiskSpaceEx seems to be the method to use, which works on UNC paths according to the MSDN docs.

like image 113
dsolimano Avatar answered Dec 22 '22 00:12

dsolimano