copy large files in Rev on Mac
revdev at pdslabs.net
Fri Dec 7 00:51:19 EST 2007
Am I missing something, or couldn't you accomplish the goal with 3
handlers like this?
on startMyCopy pFromFilePath, pToFilePath
open file pFromFilePath for binary read
open file pToFilePath for binary write
doMyCopy pFromFilePath, pToFilePath
on doMyCopy pFromFilePath, pToFilePath
read from file pFromFilePath for 32767
if the result = "eof" then
send ("endMyCopy" && pFromFilePath, pToFilePath) to me in 1 tick
write tDataSegment to file pToFilePath
send ("doMyCopy" && pFromFilePath, pToFilePath) to me in 1 tick
on endMyCopy pFromFilePath, pToFilePath
close file pFromFilePath
close file pToFilePath
answer "Copy is complete!"
Obviously you would have to include a 'bundle tree walker' approach for
bundles, but it seems to me like this would be non-blocking.
Kay C Lan wrote:
> On Dec 7, 2007 5:35 AM, Ian Wood <revlist at azurevision.co.uk> wrote:
>> The copying problems are occurring because revcopyfile is blocking
>> and people are trying to come up with non-blocking *workarounds*
> Thanks Ian for getting us back on track!
> I've been been waiting with baited breathe for someone to provide a 'wow
> isn't Rev cool' solution to this problem, but ended up almost sufficating
> because we somehow got sidetracked on separating the files and folders from
> an OSX bundle/package/app. Don't care, OSX files, folders
> bundles/package/apps work fine for me, I just NEED a workaround for my app
> to keep going whilst it's also copying 40GB of data.
> I'll return to baited breathe status in the hope for that 'cool Rev'
More information about the Use-livecode