EldoS | Feel safer!

Software components for data protection, secure storage and transfer

Re-read directory with ListDirectory()

Also by EldoS: CallbackFilter
A component to monitor and control disk activity, track file and directory operations (create, read, write, rename etc.), alter file data, encrypt files, create virtual files.
Posted: 09/17/2010 20:50:20
by Serge Shevchenko (Standard support level)
Joined: 03/24/2010
Posts: 8


Looking at documentation on ElSimpleSftpClient.ListDirectory, I see this comment: "ListDirectory should be called once"

What exactly does it mean? Does it mean that I can't use it if I want to re-read the directory for example to cross-check that all my files were succesfully uploaded or deleted?

Thank you
Posted: 09/17/2010 21:57:42
by Ken Ivanov (EldoS Corp.)

Thank you for contacting us.

If directory is read via OpenDirectory()/ReadDirectory()/CloseHandle() approach, more than one call to ReadDirectory() might be needed. That is because each ReadDirectory() call returns not the entire listing, but yet another portion of it.

This does not apply to the ListDirectory() method that returns the complete listing with a single call. The line you are asking about is intended to clarify this feature to the users of ReadDirectory() approach.

So you can safely use ListDirectory() as many times in your code as you need.



Topic viewed 1491 times

Number of guests: 1, registered members: 0, in total hidden: 0


Back to top

As of July 15, 2016 EldoS Corporation will operate as a division of /n software inc. For more information, please read the announcement.

Got it!