URL:
<http://savannah.gnu.org/bugs/?21914>
Summary: nsfilemanager has problems reporting filesizes on
several platforms
Project: GNUstep
Submitted by: rmottola
Submitted on: Sunday 12/30/2007 at 22:59
Category: Base/Foundation
Severity: 3 - Normal
Item Group: Bug
Status: None
Privacy: Public
Assigned to: None
Open/Closed: Open
Discussion Lock: Any
_______________________________________________________
Details:
using this example code:
NSFileManager *fm = [NSFileManager defaultManager];
NSDictionary *attributes = [fm fileSystemAttributesAtPath: @"/home"];
NSNumber *freefs = [attributes objectForKey: NSFileSystemFreeSize];
The documentaiton says this should return the free space "in an appropriate
measure unit". Usually it is byte, but it could be blocks for example.
On NetBSD I get:
2007-12-31 00:00:13.346 NSFMTest[225] size is 2263040000
while free blocks are:
Filesystem 512-blocks Used Avail Capacity Mounted on
/dev/wd0a 37947292 10331604 25718324 28% /
conveniently expressed in 1k blocks:
Filesystem 1K-blocks Used Avail Capacity Mounted on
/dev/wd0a 18973646 5165802 12859162 28% /
On FreeBSD the thing is even worse: freefs is nil. Nothing gets returned, as
if the quantity coulnd-t be read or (according to comments inside
NSFontManager.m) the path didn't exist.
_______________________________________________________
Reply to this item at:
<http://savannah.gnu.org/bugs/?21914>
_______________________________________________
Message sent via/by Savannah
http://savannah.gnu.org/
_______________________________________________
Bug-gnustep mailing list
[email protected]
http://lists.gnu.org/mailman/listinfo/bug-gnustep