Re: Re: Help - How to enumerate files and directory on a SFTP
Date: Tue, 23 Dec 2008 23:30:55 -0800
On Wed, Dec 24, 2008 at 02:01:42PM +0700, Ngo Hoa Lan Phuong wrote:
> If I want to enumerate only files with specified mask ( for example *.txt),
> which URL I need to pass libcurl?
I don't think that's something you can do with libcurl.
> Besides, does libcurl support direct method to get file's SIZE in SFTP server?
> I can see the size of a file only when I downloaded it or when I got the list
> of files in SFTPServer, but there aren't the good method to get files size :(
> Thanks for any help!
Hmmm, I thought you should be able to do this with the CURLOPT_NOBODY option,
but it looks to me like that option stops libcurl from even requesting the
remote file size. That leaves you with the option of doing a normal download
but installing a write callback handler that simply stores the file size and
immediately aborts the transfer.
-- http://www.MoveAnnouncer.com The web change of address service Let webmasters know that your web site has movedReceived on 2008-12-24