OpenDirectory Method  

Open the specified directory on the server for reading.


object.OpenDirectory( RemotePath )


A string that specifies the name of the directory to open on the server. The naming and pathing conventions used for the directory must be compatible with what is used on the operating system that hosts the server.

Return Value

A value of zero is returned if the operation was successful, otherwise a non-zero error code is returned which indicates the cause of the failure.


The OpenDirectory method opens the specified directory on the server so that the list of files in that directory may be read using the ReadDirectory method.

Once all of the files in the directory have been read, the application must call the CloseDirectory method in order to close the data channel to the server. Failure to do this will result in an error the next time the application attempts to transfer a file or open another directory.

Note that files and directories on UNIX based systems are case sensitive, so the directory names "Projects" and "projects" refer to two different directories. This is not the case on Windows systems, where either name would refer to the same directory.

See Also

CloseDirectory Method, GetDirectory Method, ReadDirectory Method