Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

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?

like image 663
Telcontar Avatar asked Nov 26 '10 09:11

Telcontar


People also ask

What is FTPClient in java?

FTPClient encapsulates all the functionality necessary to store and retrieve files from an FTP server. This class takes care of all low level details of interacting with an FTP server and provides a convenient higher level interface.


1 Answers

printWorkingDirectory() 

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

like image 99
mr. Vachovsky Avatar answered Sep 27 '22 18:09

mr. Vachovsky