Re: Help converting NSFilePosixPermissions to Octal representation

2008-08-25 Thread Michael Ash
On Mon, Aug 25, 2008 at 4:48 PM, Nate Weaver <[EMAIL PROTECTED]> wrote: > Addendum: I guess the format should actually be %O (unsigned long) instead > of %o (unsigned int) since it's defined as an unsigned long, though the > upper bits probably won't be filled at all. The problem is not whether th

Re: Help converting NSFilePosixPermissions to Octal representation

2008-08-25 Thread Charles E. Heizer
Thanks, I was using %o and not doing the capital %O. Thanks for the help, it's now working. - Charles On 8/25/08 1:48 PM, "Nate Weaver" <[EMAIL PROTECTED]> wrote: Addendum: I guess the format should actually be %O (unsigned long) instead of %o (unsigned int) since it's defined as an unsigned l

Re: Help converting NSFilePosixPermissions to Octal representation

2008-08-25 Thread Nate Weaver
Addendum: I guess the format should actually be %O (unsigned long) instead of %o (unsigned int) since it's defined as an unsigned long, though the upper bits probably won't be filled at all. On Aug 25, 2008, at 3:42 PM, Nate Weaver wrote: unsigned long perms = [[fileAttributes objectForKey

Re: Help converting NSFilePosixPermissions to Octal representation

2008-08-25 Thread Nate Weaver
unsigned long perms = [[fileAttributes objectForKey:NSFilePosixPermissions] unsignedLongValue]; NSString *permsInOctal = [NSString stringWithFormat:@"%o", perms]; HTH On Aug 25, 2008, at 3:03 PM, Charles E. Heizer wrote: Hello, I have been googaling and searching but I must be missing someth

Help converting NSFilePosixPermissions to Octal representation

2008-08-25 Thread Charles E. Heizer
Hello, I have been googaling and searching but I must be missing something. Can someone please tell me how to get the Octal representation from the returned value of [fileAttributes objectForKey:NSFilePosixPermissions]. Thanks, - Charles --