How to duplicate a symLink?
How to duplicate a symLink?
- Subject: How to duplicate a symLink?
- From: Lorenzo Puleo <email@hidden>
- Date: Wed, 15 May 2002 12:02:41 +0200
Hi,
how to duplicate a symLink?
I mean, same size, same unix permissions, same owner, same
creation/modification/backup dates, same locked flag...
I have the NSString pathname of the symLink file, but I can't get that
symLink parameters. Why?
1) fileAttributesAtPath returns an NSAttribute without all of these
parameters.
2) FSGetCatalogInfo needs and FSRef but
err = FSPathMakeRef([symLink fileSystemRepresentation], &symLinkRef, NULL);
always resolves the symLink path, so at the end, the FSRef points to the
symLink's target. Wrong.
3) err = PBGetCatInfoSync(&symLinkPb);
accepts fileNames up to 32 characters only (symLinkPb.dirInfo.ioNamePtr)
Even if I pass a full absolute pathName, each path component has to be max
32 chars.
3) err = FSMakeFSSpec(simLinkParent.vRefNum, parID, pName, &sourceSpec);
accept fileNames up to 32 characters only (pName).
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.
5) [manager copyPath:symLink toPath:dest handler:nil];
duplicates the symLink's target to dest. Wrong.
I can't find any solution.
Any assistance would be greatly appreciated.
Thanks.
--
Lorenzo Puleo
mailto:email@hidden
_______________________________________________
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.