ch.cyberduck.core.Local.release()方法的使用及代码示例

x33g5p2x  于2022-01-24 转载在 其他  
字(1.2k)|赞(0)|评价(0)|浏览(169)

本文整理了Java中ch.cyberduck.core.Local.release()方法的一些代码示例,展示了Local.release()的具体用法。这些代码示例主要来源于Github/Stackoverflow/Maven等平台,是从一些精选项目中提取出来的代码,具有较强的参考意义,能在一定程度帮忙到你。Local.release()方法的具体详情如下:
包路径:ch.cyberduck.core.Local
类名称:Local
方法名:release

Local.release介绍

暂无

代码示例

代码示例来源:origin: iterate-ch/cyberduck

/**
 * @param source      Connection to source server of transfer. May be null.
 * @param destination Connection to target server of transfer
 * @param files       Files transfered
 * @param callback    Prompt
 */
public void post(final Session<?> source, final Session<?> destination, final Map<TransferItem, TransferStatus> files, final ConnectionCallback callback) throws BackgroundException {
  for(Iterator<Map.Entry<Local, Object>> iter = locks.entrySet().iterator(); iter.hasNext(); ) {
    final Map.Entry<Local, Object> entry = iter.next();
    switch(this.getType()) {
      case download:
        final Local directory = entry.getKey().getParent();
        directory.release(entry.getValue());
        break;
      case upload:
        entry.getKey().release(entry.getValue());
        break;
    }
    iter.remove();
  }
}

代码示例来源:origin: iterate-ch/cyberduck

@Override
protected void logout() throws BackgroundException {
  final Path home = new LocalHomeFinderFeature(this).find();
  LocalFactory.get(this.toPath(home).toString()).release(lock);
}

相关文章