本文整理了Java中ch.cyberduck.core.Local.equals()
方法的一些代码示例,展示了Local.equals()
的具体用法。这些代码示例主要来源于Github
/Stackoverflow
/Maven
等平台,是从一些精选项目中提取出来的代码,具有较强的参考意义,能在一定程度帮忙到你。Local.equals()
方法的具体详情如下:
包路径:ch.cyberduck.core.Local
类名称:Local
方法名:equals
[英]Compares the two files using their path with a string comparision ignoring case. Implementations should override this depending on the case sensitivity of the file system.
[中]使用字符串比较忽略大小写的路径比较两个文件。根据文件系统的大小写敏感度,实现应该覆盖这一点。
代码示例来源:origin: iterate-ch/cyberduck
private boolean findTarget(final Local target, final Local root) {
return target.equals(root) || target.isChild(root);
}
}
代码示例来源:origin: iterate-ch/cyberduck
protected boolean matches(final Local context, final Local file) {
if(!new File(context.getAbsolute()).isAbsolute()) {
return context.getName().equals(file.getName());
}
return this.normalize(context).equals(this.normalize(file));
}
代码示例来源:origin: iterate-ch/cyberduck
public void copy(final Local copy, final CopyOptions options) throws AccessDeniedException {
if(copy.equals(this)) {
log.warn(String.format("%s and %s are identical. Not copied.", this.getName(), copy.getName()));
}
else {
if(log.isDebugEnabled()) {
log.debug(String.format("Copy to %s with options %s", copy, options));
}
InputStream in = null;
OutputStream out = null;
try {
in = this.getInputStream();
out = copy.getOutputStream(options.append);
IOUtils.copy(in, out);
}
catch(IOException e) {
throw new LocalAccessDeniedException(MessageFormat.format(
LocaleFactory.localizedString("Cannot copy {0}", "Error"), this.getName()), e);
}
finally {
IOUtils.closeQuietly(in);
IOUtils.closeQuietly(out);
}
}
}
代码示例来源:origin: iterate-ch/cyberduck
iter.remove();
if(download.local.equals(n.local)) {
代码示例来源:origin: iterate-ch/cyberduck
final boolean dock = destination.equals(LocalFactory.get("~/Library/Caches/TemporaryItems"));
if(dock) {
for(Path p : pasteboard) {
代码示例来源:origin: iterate-ch/cyberduck
final Transfer transfer = reader.read(f);
if(!this.getFile(transfer).equals(f)) {
this.rename(f, transfer);
代码示例来源:origin: iterate-ch/cyberduck
private void addDownloadPath(final Local f) {
this.downloadPathPopup.addItemWithTitle(f.getDisplayName());
this.downloadPathPopup.lastItem().setImage(
IconCacheFactory.<NSImage>get().fileIcon(f, 16)
);
this.downloadPathPopup.lastItem().setRepresentedObject(f.getAbbreviatedPath());
if(DEFAULT_DOWNLOAD_FOLDER.equals(f)) {
this.downloadPathPopup.selectItem(this.downloadPathPopup.lastItem());
}
}
代码示例来源:origin: iterate-ch/cyberduck
private void addDownloadPath(final Local f) {
if(downloadPathPopup.menu().itemWithTitle(f.getDisplayName()) == null) {
downloadPathPopup.addItemWithTitle(f.getDisplayName());
downloadPathPopup.lastItem().setImage(IconCacheFactory.<NSImage>get().fileIcon(f, 16));
downloadPathPopup.lastItem().setRepresentedObject(f.getAbsolute());
if(new DownloadDirectoryFinder().find(bookmark).equals(f)) {
downloadPathPopup.selectItem(downloadPathPopup.lastItem());
}
}
}
内容来源于网络,如有侵权,请联系作者删除!