Re: development question

"Alexander V. Lukyanov" <[email protected]>
Newsgroups gmane.network.lftp.devel
Message-ID <[email protected]>
On Tue, Feb 08, 2005 at 08:39:09PM +0100, Tomasz Grobelny wrote:
> Thanks, works nicely. But I have at least one more question. Is it possible to 
> obtain directory attributes in a reliable way? For files there is no problem 
> but calling "ls" on a directory lists it's contents not name and attributes. 
> I can call "ls" for .. instead of . (what if I have no privileges to list 
> files in .. ?) and get data from there but I thought that maybe there exists 
> an appropriate routine to simplify the job. TIA

There is the class GetFileInfo, which does just that - gets a single file or
directory attributes.

You create a GetFileInfo with showdir=true, wait until GetFileInfo::Done(),
then get result with GetFileInfo::GetResult. The result is FileSet, which
should contain a single FileInfo when showdir=true.

-- 
   Alexander.                      | http://www.yars.free.net/~lav/
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.