Package com.jcraft.jsch

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


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

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

     */
    public  boolean delFile(String filepath) {
    boolean flag=false;
    ChannelSftp channel=getChannel();
    try {
      channel.rm(filepath);
      log.info("删除文件"+filepath+"成功");
      flag=true;
    } catch (SftpException e) {
      log.error("删除文件"+filepath+"失败");
      log.error(e.getMessage());
View Full Code Here

            public void run()
            {
                try
                {
                    reader.close();
                    channel.rm(path);
                } catch (Exception e)
                {
                    Throwables.propagate(e);
                }
            }
View Full Code Here

     */
    public  boolean delFile(String filepath) {
    boolean flag=false;
    ChannelSftp channel=getChannel();
    try {
      channel.rm(filepath);
      log.info("删除文件"+filepath+"成功");
      flag=true;
    } catch (SftpException e) {
      log.error("删除文件"+filepath+"失败");
      log.error(e.getMessage());
View Full Code Here

        final ChannelSftp channel = getAbstractFileSystem().getChannel();
        try
        {
            if (isFile())
            {
                channel.rm(relPath);
            }
            else
            {
                channel.rmdir(relPath);
            }
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.