Retrieving a local directory listing

Top  Previous  Next

To get a local directory listing of your current local directory use the Sftp#getLocalDirListing method.  This returns an Enumeration of java.io.File objects.

 

Example

 

// get local directory listing

Enumeration f = sftp.getLocalDirListing();

while(f.hasMoreElements()) {

 File file = (File)f.nextElement();

 System.out.println(file.getName());

}





Home | Company | Products | Solutions | Purchase | Support | Services | Blog

© 2021 JSCAPE LLC