LOG.log(Level.INFO, "Testing protocol "
+ protocol.getClass().getCanonicalName()
+ " . . . this may take a few minutes . . .");
// test ls, cd, and pwd
this.cdToHOME(protocol);
RemoteSiteFile home = this.pwd(remoteSite, protocol);
this.ls(remoteSite, protocol);
if (remoteSite.getCdTestDir() != null)
this.cd(protocol, new RemoteSiteFile(home, remoteSite.getCdTestDir(),
true, remoteSite));
else
this.cdToROOT(protocol);
this.cdToHOME(protocol);
if (home == null || !home.equals(protocol.pwd()))
throw new ProtocolException("Home directory not the same after cd");
} catch (Exception e) {
LOG.log(Level.SEVERE, "Protocol "
+ protocol.getClass().getCanonicalName()
+ " failed compatibility test : " + e.getMessage());