• 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
Re: Remote copy on AFP volume
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Remote copy on AFP volume


  • Subject: Re: Remote copy on AFP volume
  • From: Quinn <email@hidden>
  • Date: Mon, 21 Apr 2008 09:32:00 +0100

At 11:46 -0700 18/4/08, James Bucanek wrote:
Does FSCopyObjectSync do this, and/or is there (still) a supported technique for remotely duplicating a file on a file server?

The routine you're looking for is PBFSCopyFileSync. This maps to the copyfile system call, which maps to the FPCopyFile AFP command.


At 22:54 -0700 19/4/08, Rob Newberry wrote:
Yes, FSCopyObjectSync should do this. On Leopard, at least, I believe it goes through the "copyfile(3)" system call.

Yikes, that's confusing. There is a copyfile system call and a copyfile library routine, but they're not related. The system call (syscall 227) is a private API, solely for the benefit of PBFSCopyFileSync. Notably, there is no <x-man-page://2/copyfile>. OTOH, the library routine is <x-man-page://3/copyfile>, which is the BSD level copy engine.


AFAIK the copyfile library routine does not call the copyfile system call.

FSCopyObject does not go through <x-man-page://3/copyfile> but it will use the copyfile system call under some circumstances. Specifically, it requires that the source and destination volumes are the same and the volume supports copyfile per the VOL_CAP_INT_COPYFILE flag returned by <x-man-page://2/getattrlist>. Notably, AFP actually allows you to copy between two different volumes as long as they're on the same server, but FSCopyObject does not take advantage of that.

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.
Filesystem-dev mailing list      (email@hidden)
Help/Unsubscribe/Update your Subscription:
This email sent to email@hidden


  • Follow-Ups:
    • Re: Remote copy on AFP volume
      • From: James Bucanek <email@hidden>
References: 
 >Remote copy on AFP volume (From: James Bucanek <email@hidden>)

  • Prev by Date: Re: Remote copy on AFP volume
  • Next by Date: Re: AFP functions 76 and 79
  • Previous by thread: Re: Remote copy on AFP volume
  • Next by thread: Re: Remote copy on AFP volume
  • Index(es):
    • Date
    • Thread