Re: How to duplicate a symLink?
Re: How to duplicate a symLink?
- Subject: Re: How to duplicate a symLink?
- From: Malte Tancred <email@hidden>
- Date: Wed, 15 May 2002 19:08:22 +0200
On wednesday, may 15, 2002, at 12:02 , Lorenzo Puleo wrote:
Hi,
how to duplicate a symLink?
I mean, same size, same unix permissions, same owner, same
creation/modification/backup dates, same locked flag...
Size is irrelevant. Owner, permissions, times for a symlink is taken
from the directory the symlink resides in, not from the symlink itself.
See the manual page for lstat (type 'man lstat' in Terminal) for more
information.
The only thing relevant when copying a symlink would be it's contents.
You can get the contents by using NSFileManager's
-pathContentOfSymbolicLinkAtPath: or the system call readlink().
I have the NSString pathname of the symLink file, but I can't get that
symLink parameters. Why?
From the lstat man page:
"The only attributes returned from an lstat() that refer to the symbolic
link itself are the file type (S_IFLNK), size, blocks, and link count
(always 1)."
I suppose this has something to do with it.
4) [manager createSymbolicLinkAtPath:dest pathContent:[manager
pathContentOfSymbolicLinkAtPath:source]];
creates a symLink with current user as owner, default permissions,
current
creation and modification date, empty backup date. Wrong.
No, I believe this is the correct behaviour.
I can't find any solution.
Any assistance would be greatly appreciated.
Thanks.
Hope this helps a bit.
Cheerio,
Malte
_______________________________________________
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.