getDirectory (Session - Java)

Creates a new Directory object using the name of the server you want to access.

Note: This method is new with Release 8.5.

Defined in



public Directory getDirectory([String server])
    throws NotesException


String server

Optional. The name of the server whose database files you want to navigate. Use an empty string ("") to indicate the current computer. If no server name is specified, the local directory as indicated by the isUseContextServer property is used.

Return value


The directory on the server you specified.


If this method is run on a server, and the server parameter is the name of a different server, the current server must have a Trusted relationship with the specified server.

See the Directory class for descriptions and examples.