Пример #1
0
 private void cleanup(FileTransferClient client, String dir) throws Exception {
   client.chdir(dir);
   String[] files = client.dir();
   for (String file : files) {
     client.delete(file);
   }
   client.chdir("..");
 }
Пример #2
0
 @Override
 protected void tearDown() throws Exception {
   if (areTestsEnabled()) {
     FileTransferClient client = connectRawClient();
     cleanup(client, getRemoteDirectory());
     client.rmdir(getRemoteDirectory());
     client.disconnect();
   }
 }
Пример #3
0
  @Override
  protected void setUp() throws Exception {
    if (areTestsEnabled()) {
      FileTransferClient client = connectRawClient();
      try {
        client.mkdir(getRemoteDirectory());
      } catch (Exception e) {

      } finally {
        client.disconnect();
      }
    }
  }