This may seem like a stupid question, so here goes:
Other than parsing the string of FileInfo.FullPath for the drive letter to then use DriveInfo("c") etc to see if there is enough space to write this file. Is there a way to get the drive letter from FileInfo?
FileInfo f = new FileInfo(path); string drive = Path.GetPathRoot(f.FullName);
This will return "C:\". That's really the only other way.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With