Re: Some issues with - createDirectoryAtPath: attributes:
Re: Some issues with - createDirectoryAtPath: attributes:
- Subject: Re: Some issues with - createDirectoryAtPath: attributes:
- From: Nicholas Riley <email@hidden>
- Date: Mon, 1 Apr 2002 05:00:41 -0600
- Mail-followup-to: email@hidden, email@hidden
On Mon, Apr 01, 2002 at 12:29:34PM +0200, email@hidden wrote:
>
755 is of course S_IRWXU+S_IRGRP+S_IXGRP+S_IROTH+S_IXOTH as defined in
>
/usr/include/sys/stat.h .
Nope. Note that the constants in that header file are specified as
octal (0 + value). You're probably passing 755 as a decimal
constant. chmod lets you omit the 0, but if you pass anything
containing a digit above 7, it complains.
>
So what's wrong: the API, the Documentation, my code?
Possibly all of the above :) Why not use the constants directly?
That way you avoid the above problem completely.
>
BTW, is there a Cocoa API which just moves a file and not copy it and
>
delete the original when the source and destination are on the same
>
disk/partition?
Not that I'm aware of. Although I'm pretty sure rename(2) will be
fine here, since it seems to preserve resource forks and metadata.
--
=Nicholas Riley <email@hidden> | <
http://www.uiuc.edu/ph/www/njriley>
Pablo Research Group, Department of Computer Science and
Medical Scholars Program, University of Illinois at Urbana-Champaign
_______________________________________________
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.