Detect free space
Detect free space
- Subject: Detect free space
- From: "Jan E. Schotsman" <email@hidden>
- Date: Sat, 14 May 2005 09:08:24 +0200
Hello list,
This may be somewhat OT but I have already asked on the Carbon-dev list
in vain. Maybe someone here has some advice.
I have a problem detecting free space on an XSan volume.
This code:
error = FSAllocateFork( fileRefNum,
kFSAllocAllOrNothingMask, fsFromStart, 0, neededSize, nil );
returns -34 (disk full)
I then tried
error = FSAllocateFork( fileRefNum, 0, fsFromStart, 0, neededSize,
&actualCount );
Now I still get -34 but actualCount = neededSize !!
If I hadn't set actualCount to nil in the first call it might have
returned the requested amount too, I suppose.
Ample free space is available actually.
One would expect an Apple file system to be able to handle
FSAllocateFork calls!
Anyway, what is the best strategy to find out about free space, either
on local or network volumes, any file system?
First try FSGetVolumeInfo, if this fails FSAllocateFork, or the other
way around? Let actualCount override the error?
Confused,
Jan.
_______________________________________________
Do not post admin requests to the list. They will be ignored.
Macnetworkprog mailing list (email@hidden)
Help/Unsubscribe/Update your Subscription:
This email sent to email@hidden