On Thu, Feb 03, 2005 at 07:22:19PM +0100, Tomasz Grobelny wrote:
> I'm trying to write my own program using lftp internally and I have two
> questions concerning lftp:
> 1. Do you plan to release sth like liblftp?

There are some libraries internal to lftp, they are not shared and not
installed by default. If there is a need, they can be made shared and
installed.

You can also make a loadable modules for lftp. (That is, not a program
which uses lftp libraries, but a module which is used by lftp).

There are some examples of modules. E.g. mirror command can be a module
if configured with the option --with-modules.

> 2. How do I get directory listing? For now I managed to parse what Read
> returns after opening connection with LONG_LIST flag. Is the output remote
> server independent? Is is possible to get this data in a structure? I noticed
> fileinfo structure but it lacks at least permission info. Is it the way to go
> or there is no such possibility to get data in nice format?

There is ListInfo class. It is created with FileAccess::MakeListInfo method,
then it does all the work and nice info can be fetched with GetResult method.
You can see some examples in lftp code.

And yes, LONG_LIST returns human-readable server dependent output.

--
   Alexander.

Reply via email to