FROM : John Stiles
DATE : Sat Jul 01 21:18:15 2006
Sherm Pendley wrote:
> On Jul 1, 2006, at 1:41 PM, Dean Snyder wrote:
>
>> Greg Titus wrote at 10:26 AM on Saturday, July 1, 2006:
>>
>>> [[NSFileManager defaultManager] movePath:src toPath:dest
>>> handler:handler];
>>>
>>> Hope this helps!
>>
>>> From Apple documentation for NSFileManager movePath:
>>
>> "If source is a file, the method creates a file at destination that
>> holds the exact contents of the original file and then deletes the
>> original file. If source is a directory, movePath:toPath:handler:
>> creates a new directory at destination and recursively populates it with
>> duplicates of the files and directories contained in source."
>>
>> This is really heavyweight
>
> No, it's not heavy at all - you've just misunderstood what it does.
> When the above says "creates a file at destination", it's talking
> about creating a new directory entry that points to the same data, not
> about copying the data.
I don't see any way that you could read this entry without interpreting
it as "directories are copied element-by-element." There's no ambiguity
at all.
DATE : Sat Jul 01 21:18:15 2006
Sherm Pendley wrote:
> On Jul 1, 2006, at 1:41 PM, Dean Snyder wrote:
>
>> Greg Titus wrote at 10:26 AM on Saturday, July 1, 2006:
>>
>>> [[NSFileManager defaultManager] movePath:src toPath:dest
>>> handler:handler];
>>>
>>> Hope this helps!
>>
>>> From Apple documentation for NSFileManager movePath:
>>
>> "If source is a file, the method creates a file at destination that
>> holds the exact contents of the original file and then deletes the
>> original file. If source is a directory, movePath:toPath:handler:
>> creates a new directory at destination and recursively populates it with
>> duplicates of the files and directories contained in source."
>>
>> This is really heavyweight
>
> No, it's not heavy at all - you've just misunderstood what it does.
> When the above says "creates a file at destination", it's talking
> about creating a new directory entry that points to the same data, not
> about copying the data.
I don't see any way that you could read this entry without interpreting
it as "directories are copied element-by-element." There's no ambiguity
at all.






Cocoa mail archive

