Re: Question about movePath
Re: Question about movePath
- Subject: Re: Question about movePath
- From: Chris Parker <email@hidden>
- Date: Tue, 22 Jan 2002 14:00:38 -0800
To answer these inline...
On Tuesday, January 22, 2002, at 01:45 PM, Lance Bland wrote:
On Tuesday, January 22, 2002, at 04:26 PM, Finlay Dobbie wrote:
Yes, it really does a deep copy of the entire directory.
And you no doubt lose all the HFS metadata and resource forks...
NSFileManager copies resource fork and Finder info from the source.
There is mention made of the resource fork support in the release notes.
and what about just using rename() if on the same file system? Is
rename() supported on HFS+?
rename() works on HFS+ and preserves the fork.
On a flat filesystem to which something has been copied that has a
resource fork, rename() will correctly rename the data fork, but not the
corresponding ._ file.
E.g. if you copy with the Finder or NSFileManager the file "foo" which
contains a resource fork from an HFS+ volume up to an SMB-mounted
volume, you'll get "foo" and "._foo" as the data and resource forks
respectively.
Using rename() on foo doesn't do ._foo automatically.
.chris
--
Chris Parker <email@hidden>
Cocoa Frameworks Engineer