• 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: file copying revisited
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: file copying revisited


  • Subject: Re: file copying revisited
  • From: Ali Ozer <email@hidden>
  • Date: Tue, 3 Jul 2001 09:03:42 -0700

> first off, i'm a newcomer to the list, so if this topic has been beaten
> to death, don't mind me. i've read through the web archives looking for
> information on copying files with resource forks (or at least preserve
> the type/creator codes). my original code used NSFileManager's
> copyPath, which stripped the resource fork. then i saw someone mention
> that using NSWorkspace's performFileOperation might do the trick.
> unfortunately, this approach strips the resource fork as well. is there
> any way to accomplish this in cocoa? i'd hate to have to introduce
> MoreFiles into such an elegant environment :) TIA,

There are bunch of questions on this; just to clarify: NSFileManager
currently does not correctly copy or move resource forks and other
metadata. It might work in some cases (when you move files within a
volume for instance; or when you copy directories on NFS/UFS, where
metadata sits in extra files) but not in general, so don't count on it
in the general case. We are looking at this issue.

In the meantime, if you do need this, maybe someone out there has
written the code to do it? You can either use Carbon, or use lower level
functions which take care of dealing with attributes. Depending on your
needs you hopefully don't need a full rewrite of NSFileManager!

Ali


References: 
 >file copying revisited (From: Dan Watson <email@hidden>)

  • Prev by Date: Re: Obtaining Current User Name
  • Next by Date: Re: NSMatrix problem
  • Previous by thread: file copying revisited
  • Next by thread: Re: NSBrowser will not select row 0 (With Source)
  • Index(es):
    • Date
    • Thread