本文整理了Java中ch.cyberduck.core.Local.getSymlinkTarget()
方法的一些代码示例,展示了Local.getSymlinkTarget()
的具体用法。这些代码示例主要来源于Github
/Stackoverflow
/Maven
等平台,是从一些精选项目中提取出来的代码,具有较强的参考意义,能在一定程度帮忙到你。Local.getSymlinkTarget()
方法的具体详情如下:
包路径:ch.cyberduck.core.Local
类名称:Local
方法名:getSymlinkTarget
暂无
代码示例来源:origin: iterate-ch/cyberduck
@Override
public boolean resolve(final Local file) throws NotfoundException, LocalAccessDeniedException {
if(PreferencesFactory.get().getBoolean("local.symboliclink.resolve")) {
// Follow links instead
return false;
}
// Create symbolic link only if supported by the host
if(feature != null) {
final Local target = file.getSymlinkTarget();
// Only create symbolic link if target is included in the upload
for(TransferItem root : files) {
if(this.findTarget(target, root.local)) {
if(log.isDebugEnabled()) {
log.debug(String.format("Resolved target %s for %s", target, file));
}
return true;
}
}
}
return false; //Follow links instead
}
代码示例来源:origin: iterate-ch/cyberduck
protected NSBundle bundle(final NSBundle main, Local executable) {
if(!executable.isSymbolicLink()) {
return main;
}
while(executable.isSymbolicLink()) {
try {
executable = executable.getSymlinkTarget();
}
catch(NotfoundException e) {
return main;
}
}
Local folder = executable.getParent();
NSBundle b;
do {
b = NSBundle.bundleWithPath(folder.getAbsolute());
if(null == b) {
log.error(String.format("Loading bundle %s failed", folder));
break;
}
if(StringUtils.equals(String.valueOf(Path.DELIMITER), b.bundlePath())) {
break;
}
folder = folder.getParent();
}
while(b.executablePath() == null);
return b;
}
}
代码示例来源:origin: iterate-ch/cyberduck
local.getSymlinkTarget().getAbsolute());
if(log.isDebugEnabled()) {
log.debug(String.format("Create symbolic link from %s to %s", file, target));
代码示例来源:origin: iterate-ch/cyberduck
if(!symlinkResolver.resolve(local)) {
final Local target = local.getSymlinkTarget();
status.setLength(target.attributes().getSize());
内容来源于网络,如有侵权,请联系作者删除!