Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Available space on NAS
Message
De
20/02/2014 22:53:35
 
 
À
20/02/2014 21:25:45
Information générale
Forum:
ASP.NET
Catégorie:
Autre
Versions des environnements
Environment:
VB 9.0
OS:
Windows 7
Network:
Windows 2003 Server
Database:
MS SQL Server
Application:
Web
Divers
Thread ID:
01594835
Message ID:
01594854
Vues:
37
>>If you just want to make sure your application isn't going to run out of free space, then you really only care about the volume(s) to which you have been granted access. If these are mounted on your local computer as SMB/CIFS volumes, then they should respond to DOS, Win32 or .Net calls to get information about them. Googling I find http://msdn.microsoft.com/en-us/library/system.io.driveinfo%28v=vs.110%29.aspx?cs-save-lang=1&cs-lang=vb#code-snippet-1 . The .TotalSize, .TotalFreeSpace and (especially) .AvailableFreeSpace properties should give you what you need.
>
>This is good if you have a map drive. Because, this requires a map letter. If you try to use \\NAS\ShareName, this will give:
>
>"Object must be a root directory ("C:\") or a drive letter ("C")."
>
>This is why I was not able to use that approach on the VM.

How about http://stackoverflow.com/questions/14465187/get-available-disk-free-space-for-a-given-path-on-windows ?
Regards. Al

"Violence is the last refuge of the incompetent." -- Isaac Asimov
"Never let your sense of morals prevent you from doing what is right." -- Isaac Asimov

Neither a despot, nor a doormat, be

Every app wants to be a database app when it grows up
Précédent
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform