bug-gnustep
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[bug #21914] nsfilemanager has problems reporting filesizes on several p


From: Riccardo mottola
Subject: [bug #21914] nsfilemanager has problems reporting filesizes on several platforms
Date: Sun, 30 Dec 2007 22:59:04 +0000
User-agent: Mozilla/5.0 (X11; U; FreeBSD i386; en-US; rv:1.8.1.11) Gecko/20071213 SeaMonkey/1.1.7

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/





reply via email to

[Prev in Thread] Current Thread [Next in Thread]