Apache Commons Net FTPClient and listFiles()

Posted by Vladimir on Stack Overflow See other posts from Stack Overflow or by Vladimir
Published on 2010-04-26T11:20:30Z Indexed on 2010/04/26 11:23 UTC
Read the original article Hit count: 300

Filed under:
|

Can anyone explain me what's wrong with the following code? I tried different hosts, FTPClientConfigs, it's properly accessible via firefox/filezilla...

    FTPClientConfig config = new FTPClientConfig(FTPClientConfig.SYST_L8);

    FTPClient client = new FTPClient();
    client.configure(config);

    client.connect("c64.rulez.org");
    client.login("anonymous", "anonymous");
    client.enterRemotePassiveMode();

    FTPFile[] files = client.listFiles();
    Assert.assertTrue(files.length > 0);

© Stack Overflow or respective owner

Related posts about java

Related posts about apache-commons