SshFileService implements GridFileService { @Override public boolean exists(String remoteFile) throws IOException { return exists(remoteFile, retries, timeout); } SshFileService(GridTransportConnection transportConnection); void setTimeout(int millis); void setRetries(int retries); void setUserDirIsRoot(boolean isRoot); @Override void put(File localFile, String remoteFile); void put(File localFile, String remoteFile, int attempts, int delayMillis); @Override void get(String remoteFile, File localFile); void get(String remoteFile, File localFile, int attempts, int delayMillis); @Override boolean exists(String remoteFile); @Override void delete(String remoteFile); void delete(String remoteFile, int attempts, int delayMillis); void setHostKeyChecking(String s); void setIdentityFile(String s); @Override void touch(String remoteFile); void touch(String remoteFile, int attempts, int delayMillis); @Override URI remoteFileRepresentationToLocalURI(String file); @Override void mkdir(String remoteDir); void mkdir(String remoteDir, int attempts, int delayMillis); @Override void move(String origin, String destination); void move(String origin, String destination, int attempts, int delayMillis); @Override void copy(String origin, String destination); void copy(String origin, String destination, int attempts, int delayMillis);  }
@Test (groups = { "ssh" }, dependsOnMethods = { "testPut" } ) public void testExists() { try { AssertJUnit.assertTrue(gfs.exists("testing/test.txt")); } catch (IOException e) { e.printStackTrace(); } }