Package com.jcraft.jsch

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


  protected void doRename(FileObject newfile) throws Exception
  {
    final ChannelSftp channel = fileSystem.getChannel();
    try
    {
      channel.rename(relPath, ((SftpFileObject) newfile).relPath);
    }
    finally
    {
      fileSystem.putChannel(channel);
    }
View Full Code Here


    protected void doRename(FileObject newfile) throws Exception
    {
        final ChannelSftp channel = fileSystem.getChannel();
        try
        {
            channel.rename(relPath, ((SftpFileObject) newfile).relPath);
        }
        finally
        {
            fileSystem.putChannel(channel);
        }
View Full Code Here

    protected void doRename(FileObject newfile) throws Exception
    {
        final ChannelSftp channel = fileSystem.getChannel();
        try
        {
            channel.rename(relPath, ((SftpFileObject) newfile).relPath);
        }
        finally
        {
            fileSystem.putChannel(channel);
        }
View Full Code Here

     */
    public  boolean rename(String oldpath,String newpath) {
     boolean flag=false;
     ChannelSftp channel=getChannel();
     try {
       channel.rename(oldpath, newpath);
       log.info("重命名文件"+oldpath+"成功");
       log.info("更新后的文件名为:"+newpath);
       flag=true;
     } catch (SftpException e) {
       log.error("重命名文件"+oldpath+"失败");
View Full Code Here

     */
    public  boolean rename(String oldpath,String newpath) {
     boolean flag=false;
     ChannelSftp channel=getChannel();
     try {
       channel.rename(oldpath, newpath);
       log.info("重命名文件"+oldpath+"成功");
       log.info("更新后的文件名为:"+newpath);
       flag=true;
     } catch (SftpException e) {
       log.error("重命名文件"+oldpath+"失败");
View Full Code Here

    {
        final ChannelSftp channel = getAbstractFileSystem().getChannel();
        try
        {
            final SftpFileObject newSftpFileObject = (SftpFileObject) FileObjectUtils.getAbstractFileObject(newFile);
            channel.rename(relPath, newSftpFileObject.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.