Discuss this help topic in SecureBlackbox Forum

TElSftpClient.ReadDirectory

TElSftpClient     See also     


Filter: C#  VB.NET  Pascal  C++  PHP  Java  


Reads the part of directory contents

Declaration

[C#]
    bool ReadDirectory(byte[] Handle);

[VB.NET]
    Function ReadDirectory(ByVal Handle As Byte()) As Boolean

[Pascal]
    function ReadDirectory(Handle : TSBSftpFileHandle): Boolean;
    function ReadDirectorySync(Handle: TSBSftpFileHandle): Boolean;
    type TSBSftpFileHandle = ByteArray;

[C++]
    bool ReadDirectory(const std::vector<uint8_t> &Handle);

[PHP]
    bool ReadDirectory(array of byte|string|NULL $Handle)

[Java]
    boolean readDirectory(byte[] Handle);

Parameters

  • Handle - handle to opened directory, returned by OnOpenFileevent

Return value

    True if operation was completed successfully;
    False otherwise.

Description

    Use this method to read a part of directory contents from opened directory. Do not pass as Handle the handle to opened file. If the part of directory contents was successfully read, the OnDirectoryListing event is fired. The OnError event is fired otherwise.
    The client should call ReadDirectory repeatedly until it has found the file it is looking for or until the OnError event is fired. The client should then close the handle using the CloseHandle method.
    If there are no more entries to return, OnError event is fired with error code SSH_ERROR_EOF.

See also:     Read     OpenDirectory    

Discuss this help topic in SecureBlackbox Forum