Re: NSFileManager
Re: NSFileManager
- Subject: Re: NSFileManager
- From: "Erik M. Buck" <email@hidden>
- Date: Fri, 22 Feb 2002 22:19:38 -0600
Regarding Posix permissions, convert the decimal numbers to octal and you
will see the familiar representation with no digit grater than 7.
1024 decimal is equal to 2000 octal (base 8) is equal to 400 hexadecimal
(base 16)
Traditional 777 Posix permissions are 511 decimal and 1ff hexadecimal.
You can create octal constants in C by prepending 0: example 0777 is octal
You can create hexadecimal constants by preceding 0x: example 0x1ff is
hexadecimal
If this is not clear or you do not understand number systems with abase
other than 10, consult an introductory computer science text book or a
discrete math text book.
----- Original Message -----
From: "Clark Mueller" <email@hidden>
To: <email@hidden>
Sent: Friday, February 22, 2002 9:04 PM
Subject: NSFileManager
>
Hi. I have two questions about NSFileManager.
>
>
When I use fileAttributesAtPath:path traverseLink:NO, I get, in return,
>
and NSDictionary containing various attributes. Two of these attributes
>
are of interest to me at the moment: NSFileSize, NSFilePosixPermissions.
>
Both of these keys return an NSNumber, which I then in turn place into
>
an NSTextField outlet.
>
>
My problem with NSFilePosixPermissions is that the values it is
>
returning are making no sense. I get numbers like 1024 and 482 and
>
things like that, which aren't even valid POSIX permission numbers,
>
right? (Check me on that last bit, because that may be my problem.) I'm
>
expecting to see no digits higher than 7, correct? I had initially
>
thought that my problem was using the wrong data type, or retrieving the
>
value incorrectly, but no matter how I get it or use it, I get these
>
kinds of numbers.
>
>
My question about NSFileSize is similar, and I've been thinking these
>
may be related. Likewise, I find that these values are sometimes
>
returned correctly, sometimes not. Largely, the problem seems to be with
>
bundles or with directories and mount points. Do I need to call
>
-[NSFileManager fileAttributesAtPath:path traverseLink:YES] in order to
>
work through the tree?
>
>
TIA.
>
>
---
>
Clark Mueller
>
email@hidden
>
---
>
http://www.finikin.com/
>
I resolve to stop procrastinating...starting tomorrow.
>
_______________________________________________
>
cocoa-dev mailing list | email@hidden
>
Help/Unsubscribe/Archives:
http://www.lists.apple.com/mailman/listinfo/cocoa-dev
>
Do not post admin requests to the list. They will be ignored.
_______________________________________________
cocoa-dev mailing list | email@hidden
Help/Unsubscribe/Archives:
http://www.lists.apple.com/mailman/listinfo/cocoa-dev
Do not post admin requests to the list. They will be ignored.