• Open Menu Close Menu
  • Apple
  • Shopping Bag
  • Apple
  • Mac
  • iPad
  • iPhone
  • Watch
  • TV
  • Music
  • Support
  • Search apple.com
  • Shopping Bag

Lists

Open Menu Close Menu
  • Terms and Conditions
  • Lists hosted on this site
  • Email the Postmaster
  • Tips for posting to public mailing lists
How to duplicate a symLink?
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

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.

  • Follow-Ups:
    • Re: How to duplicate a symLink?
      • From: Malte Tancred <email@hidden>
    • Re: How to duplicate a symLink?
      • From: Chris Ridd <email@hidden>
  • Prev by Date: System wide Contextual Menu plug ins
  • Next by Date: Re: How to duplicate a symLink?
  • Previous by thread: Re: System wide Contextual Menu plug ins
  • Next by thread: Re: How to duplicate a symLink?
  • Index(es):
    • Date
    • Thread