Package com.trilead.ssh2

Examples of com.trilead.ssh2.SFTPv3Client.rm()


  }

  private void deleteCommandScript(String commandFile) throws Exception {
    try {
      SFTPv3Client sftpClient = new SFTPv3Client(this.getSshConnection());
      sftpClient.rm(commandFile);
      sftpClient.close();
    }
    catch (Exception e) {
      getLogger().warn("Failed to delete remote command script: " + e);
    }
View Full Code Here


      sftpConn = new SFTPv3Client(conn);
      SFTPv3DirectoryEntry dirEntry = getDirectoryEntry(pathString);
      if (dirEntry.attributes.isDirectory()) {
        deleteDirectory(sftpConn, dirEntry, pathString);
      } else
        sftpConn.rm(pathString);
    } catch (IOException e) {
      throw e;
    } finally {
      if (sftpConn != null)
        sftpConn.close();
View Full Code Here

      SFTPv3DirectoryEntry dirEntry = getDirectoryEntry(pathString);
      if (dirEntry.attributes.isDirectory()) {
        deleteBackupDirectory(sftpConn, dirEntry, pathString);
      } else if (dirEntry.filename.startsWith("#")
          && dirEntry.filename.endsWith("#"))
        sftpConn.rm(pathString);
    } catch (IOException e) {
      throw e;
    } finally {
      if (sftpConn != null)
        sftpConn.close();
View Full Code Here

TOP
Copyright © 2018 www.massapi.com. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.