Package com.jcraft.jsch

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


            }
            catch (IOException e) {}
          }
          try {
            // should be empty
            channel.rmdir("si.sftp.sample");
          }
          catch (SftpException e) {
            fail("Expected remote directory to be empty " + e.getMessage());
          }
          return null;
View Full Code Here


      {
        channel.rm(relPath);
      }
      else
      {
        channel.rmdir(relPath);
      }
    }
    finally
    {
      fileSystem.putChannel(channel);
View Full Code Here

            {
                channel.rm(relPath);
            }
            else
            {
                channel.rmdir(relPath);
            }
        }
        finally
        {
            fileSystem.putChannel(channel);
View Full Code Here

            {
                channel.rm(relPath);
            }
            else
            {
                channel.rmdir(relPath);
            }
        }
        finally
        {
            fileSystem.putChannel(channel);
View Full Code Here

     */
    public  boolean delDir(String directory) {
      boolean flag=false;
      ChannelSftp channel=getChannel();
      try {
        channel.rmdir(directory);
        log.info("删除目录:"+directory+"成功");
        flag=true;
      } catch (SftpException e) {
        log.error("删除目录:"+directory+"失败");
        log.error(e.getMessage());
View Full Code Here

     */
    public  boolean delDir(String directory) {
      boolean flag=false;
      ChannelSftp channel=getChannel();
      try {
        channel.rmdir(directory);
        log.info("删除目录:"+directory+"成功");
        flag=true;
      } catch (SftpException e) {
        log.error("删除目录:"+directory+"失败");
        log.error(e.getMessage());
View Full Code Here

            {
                channel.rm(relPath);
            }
            else
            {
                channel.rmdir(relPath);
            }
        }
        finally
        {
            getAbstractFileSystem().putChannel(channel);
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.