more problems with ftp

Alex Tweedly alex at tweedly.net
Mon Sep 13 08:26:21 EDT 2004


At 10:08 13/09/2004 +0100, Dave Cragg wrote:
>On 13 Sep 2004, at 00:32, Alex Tweedly wrote:
>>
>>I don't know if this is a bug, or if this difference between http:// and 
>>ftp:// forms is intentional.
>Looks like a bug. There should be no difference between http and ftp 
>downloads to file, but it seems I managed to mess up here. (At some point, 
>I added some cute stuff for closing files when doing uploads and it looks 
>like I overlooked that this might interfere with downloads.)

Thanks Dave - I'll cut it down to a simple example stack and submit.

>By the way, libUrlDownloadToFile was only added for dealing with huge 
>files that might not fit in available memory. If dealing with "normal" 
>files, I'd recommend using simple gets and puts.
>
>get url "ftp://whatever"
>if the result is empty then
>   put it into url "binfile: whatever"
>else
>   ##error stuff
>end if

I'm using libURLDownloadToFile to asynchronously load a disk cache, where 
the total space could be large, even though each file is small (50-250K). 
(I want each one stored on local disk, both for caching between sessions 
and for off-line usage).

I could (perhaps should) have done it with load URL and cachedURLs and 
unload URL - but it seemed simpler to just transfer them direct to 
disk.  I'll take a look at changing over.

Is there a limit to the number of simultaneous loads ?
If I issue say 20 load commands, are they queued so that only N happen at a 
time ?
If so - what is N ? And, of course, can it be changed ?

Thanks
-- Alex.


More information about the use-livecode mailing list