FROM : Mike Abdullah
DATE : Tue Aug 01 02:06:37 2006
OK, that rather surprises me - why haven't Apple done a decent file
copying system in Cocoa yet! Maybe I should file a request.
So, I downloaded MoreFilesX. It's readme says quite a bit about the
HFD+ APIs. Am I right in thinking that the code will use the HFS+ if
suitable, but that it will still work for non-HFS+ operations?
Assuming that this is OK, I've had a look at the command FSCopyFork -
I assume that's the one you meant? However, I know very little of
this Carbon style stuff and so I'm a little confused :(
The function requires a source reference number, a destination
reference number, a copy buffer, and a copy buffer size.
I understand the first two and how to sort them out (I think!), but I
haven't a clue where to start with the buffer stuff. Any chance you
could nudge me in the right direction? I've googled around, but not
found any examples yet.
Mike.
On 31 Jul 2006, at 18:32, Scott Ribe wrote:
>> So basically what I am asking is, what is the best strategy for
>> copying large files in Cocoa and providing full progress feedback and
>> the ability to cancel the operation? (Without resorting to an NSTask
>> also!)
>
> There really isn't a Cocoa option. You'd have to write a lower-
> level copy
> function yourself, probably having it use
> performSelectorOnMainThread to
> post updates back to the UI. Fortunately, the myriad details you'd
> need to
> take care of when copying a file are handled in sample code. Look for
> MoreFilesX, specifically FSCopyObject...
>
> --
> Scott Ribe
> <email_removed>
> http://www.killerbytes.com/
> (303) 722-0567 voice
>
>
DATE : Tue Aug 01 02:06:37 2006
OK, that rather surprises me - why haven't Apple done a decent file
copying system in Cocoa yet! Maybe I should file a request.
So, I downloaded MoreFilesX. It's readme says quite a bit about the
HFD+ APIs. Am I right in thinking that the code will use the HFS+ if
suitable, but that it will still work for non-HFS+ operations?
Assuming that this is OK, I've had a look at the command FSCopyFork -
I assume that's the one you meant? However, I know very little of
this Carbon style stuff and so I'm a little confused :(
The function requires a source reference number, a destination
reference number, a copy buffer, and a copy buffer size.
I understand the first two and how to sort them out (I think!), but I
haven't a clue where to start with the buffer stuff. Any chance you
could nudge me in the right direction? I've googled around, but not
found any examples yet.
Mike.
On 31 Jul 2006, at 18:32, Scott Ribe wrote:
>> So basically what I am asking is, what is the best strategy for
>> copying large files in Cocoa and providing full progress feedback and
>> the ability to cancel the operation? (Without resorting to an NSTask
>> also!)
>
> There really isn't a Cocoa option. You'd have to write a lower-
> level copy
> function yourself, probably having it use
> performSelectorOnMainThread to
> post updates back to the UI. Fortunately, the myriad details you'd
> need to
> take care of when copying a file are handled in sample code. Look for
> MoreFilesX, specifically FSCopyObject...
>
> --
> Scott Ribe
> <email_removed>
> http://www.killerbytes.com/
> (303) 722-0567 voice
>
>
| Related mails | Author | Date |
|---|---|---|
| Mike Abdullah | Jul 31, 18:04 | |
| Scott Ribe | Jul 31, 19:32 | |
| Mike Abdullah | Aug 1, 02:06 | |
| Adam R. Maxwell | Aug 1, 03:33 | |
| Mike Abdullah | Aug 1, 17:38 | |
| Shawn Erickson | Aug 1, 17:51 | |
| Mike Abdullah | Aug 1, 19:50 |






Cocoa mail archive

