Re: GetDiskSpaceAvailable in Linux
timeless <[email protected]>
| Newsgroups | gmane.comp.mozilla.devel.nspr |
|---|---|
| Organization | http://groups.google.com |
| Message-ID | <[email protected]> |
On Jun 1, 8:43 pm, Wan-Teh Chang <[email protected]> wrote: > nsILocalFile is an XPCOM interface. Please ask this question > in the xpcom newsgroup/mailing list. You can find it by > searching for "xpcom" in this page:http://www.mozilla.org/community/developer-forums.html he actually posted the same question about half an hour earlier in the right forum. http://groups.google.com/group/mozilla.dev.tech.xpcom/browse_thread/thread/71aeae6ed2aaee24/50b68958f71388f1 impatient guy. > The Unix/Linux implementation ofGetDiskSpaceAvailableis here:http://lxr.mozilla.org/seamonkey/source/xpcom/io/nsLocalFileUnix.cpp#... > > Since Linux has both <sys/statfs.h> and <sys/statvfs.h>, it seems > that this method is implemented. I suspect that the call failed. > Check the return value of mFile->GetDiskSpaceAvailable(&iSize). > Does it return NS_ERROR_FAILURE or NS_OK? If it returns > NS_ERROR_FAILURE, what's the value of 'errno'? otoh, he managed to get approximately the same answer faster by posting here, so it's hard for me to blame him.