Re: cp creates directory with different permissions -- then reverts them
Re: cp creates directory with different permissions -- then reverts them
- Subject: Re: cp creates directory with different permissions -- then reverts them
- From: Quinn <email@hidden>
- Date: Thu, 2 Nov 2006 11:09:36 +0000
At 18:09 -0400 1/11/06, Jerry Krinock wrote:
This also looks very easy: Since items with names beginning in the dot "."
are hidden, simply prefix the item's name with a "." while you are
scribbling, and then when you're done scribbling, rename it, removing the
"." prefix.
Should that do it, or am I oversimplifying?
Historically the Finder has tracked file system objects by their CNID
(for Mac folks, think "dir ID or file ID"; for UNIX folks, think
"inode"), which undermines this approach because the rename is not
creating a new FS object but changing metadata (the name) on an
existing FS object. However, my guess is that this would work with
the Mac OS X Finder, which is much more name centric. Still, the
only way to be sure is to try.
It's still better, IMHO, to do your work in an entirely different
location if that's possible. Traditional Mac OS semantics allow you
to ask for a temporary directory on any volume (that is, FSFindFolder
takes a "on which volume" parameter). There's no guarantee you'll
get one (for example, you typically won't get one on a server
volume), but it's best to ask and then fall back to working in the
same directory as the destination.
Another nice attribute of using a temporary directory is that, if
something goes wrong, the junk is left in the temporary directory,
where it can be easily identified and cleaned up.
S+E
--
Quinn "The Eskimo!" <http://www.apple.com/developer/>
Apple Developer Relations, Developer Technical Support, Core OS/Hardware
_______________________________________________
Do not post admin requests to the list. They will be ignored.
Darwin-kernel mailing list (email@hidden)
Help/Unsubscribe/Update your Subscription:
This email sent to email@hidden