Examples of rm()


Examples of com.jcraft.jsch.ChannelSftp.rm()

    final ChannelSftp channel = fileSystem.getChannel();
    try
    {
      if (getType() == FileType.FILE)
      {
        channel.rm(relPath);
      }
      else
      {
        channel.rmdir(relPath);
      }
View Full Code Here

Examples of com.jcraft.jsch.ChannelSftp.rm()

        final ChannelSftp channel = fileSystem.getChannel();
        try
        {
            if (getType() == FileType.FILE)
            {
                channel.rm(relPath);
            }
            else
            {
                channel.rmdir(relPath);
            }
View Full Code Here

Examples of com.jcraft.jsch.ChannelSftp.rm()

        final ChannelSftp channel = fileSystem.getChannel();
        try
        {
            if (getType() == FileType.FILE)
            {
                channel.rm(relPath);
            }
            else
            {
                channel.rmdir(relPath);
            }
View Full Code Here

Examples of com.sshtools.j2ssh.SftpClient.rm()

        // Change the local directory
        sftp.lcd("localdir");
        // Download a file
        sftp.get("somefile.txt", "anotherfile.txt");
        // Remove a directory or file
        sftp.rm("j2ssh");
        // Quit
        sftp.quit();
        ssh.disconnect();
      }
    }
View Full Code Here

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

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

      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

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

      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

Examples of org.eclipse.jgit.api.Git.rm()

  protected RevCommit mv(File repo, String from, String to, String message)
      throws Exception {
    File file = new File(repo.getParentFile(), from);
    file.renameTo(new File(repo.getParentFile(), to));
    Git git = Git.open(repo);
    git.rm().addFilepattern(from);
    git.add().addFilepattern(to).call();
    RevCommit commit = git.commit().setAll(true).setMessage(message)
        .setAuthor(author).setCommitter(committer).call();
    assertNotNull(commit);
    return commit;
View Full Code Here

Examples of org.eclipse.jgit.api.Git.rm()

   */
  protected RevCommit delete(String path) throws Exception {
    String message = MessageFormat.format("Committing {0} at {1}", path,
        new Date());
    Git git = Git.open(testRepo);
    git.rm().addFilepattern(path).call();
    RevCommit commit = git.commit().setOnly(path).setMessage(message)
        .setAuthor(author).setCommitter(committer).call();
    assertNotNull(commit);
    return commit;
  }
View Full Code Here

Examples of org.eclipse.jgit.api.Git.rm()

    // rename it
    writeTrashFile(FILENAME_2, join(content1));
    git.add().addFilepattern(FILENAME_2).call();
    deleteTrashFile(FILENAME_1);
    git.rm().addFilepattern(FILENAME_1).call();
    git.commit().setMessage("rename file1.txt to file2.txt").call();

    // and change the new file
    String[] content2 = new String[] { "third", "first", "second" };
    writeTrashFile(FILENAME_2, join(content2));
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.