LibURL Puzzlement
Jim Bufalini
jim at visitrieve.com
Tue May 12 17:35:22 EDT 2009
Hi Terry,
It's as simple as:
Put "ftp://" & <user> & ":" & <password> & "@" & <host> & </path/> into
myDirVar
NLST or LIST first will determine if you get just the file and directory
names or the long form. This persists beyond the handler, so set it back at
the end of your handler.
Make sure you path ends with "/" and not a file name or the same command
will retrieve a file. With slash it gives you a directory, if the directory
exists. Otherwise and error in *the result*.
Aloha From Hawaii,
Jim Bufalini
> -----Original Message-----
> From: use-revolution-bounces at lists.runrev.com [mailto:use-revolution-
> bounces at lists.runrev.com] On Behalf Of Tereza Snyder
> Sent: Tuesday, May 12, 2009 11:05 AM
> To: use-revolution at lists.runrev.com Use Revolution
> Subject: LibURL Puzzlement
>
>
> Hi all,
>
> I'm using libUrl for the first time, and my first task is to obtain a
> list of files in a directory on the server. In terminal, I can log
> onto the server via ftp and I can type 'nlist' or 'ls' to obtain a
> list of files. I see in the docs that, "You specify which command to
> use with the libURLSetFTPListCommand command." But I don't see where
> or how you actually get the list of files using libUrl.
>
> I tried:
>
> get libUrlFtpCommand( pCmd, the uServer of me, the uUser of me,
> the uPasswd of me )
>
> where pCmd is "LIST" or "NLIST" or "NLST" or "LS" and all yield error
> messages. Besides, it makes no sense that there should be a
> libURLSetFTPListCommand for specifying what kind of list to return
> without a corresponding function to actually obtain a list. Right? If
> so, what is it?
>
> Is there a sample FTP browser written in Rev that uses libURL that I
> can use to get a head start?
>
> -t
>
>
>
> --
> Tereza Snyder
> Califex Software, Inc.
> <www.califexsoftware.com>
>
> _______________________________________________
> use-revolution mailing list
> use-revolution at lists.runrev.com
> Please visit this url to subscribe, unsubscribe and manage your
> subscription preferences:
> http://lists.runrev.com/mailman/listinfo/use-revolution
More information about the use-livecode
mailing list