Telcontar
Telcontar

Reputation: 4870

Java Apache FTPClient: How to know my current directory

My question is simple: i'm using the Apache commons.net API in a simple app which connects to an FTP, i can change the working directory with the changeWorkingDirectory method. but... how can i know my current directory whitout changing it?

Upvotes: 7

Views: 18951

Answers (1)

mr. Vachovsky
mr. Vachovsky

Reputation: 1128

printWorkingDirectory() 

Returns the pathname of the current working directory. Here's the reference.

Upvotes: 22

Related Questions