本文整理了Java中ch.cyberduck.core.Path.getSymlinkTarget()
方法的一些代码示例,展示了Path.getSymlinkTarget()
的具体用法。这些代码示例主要来源于Github
/Stackoverflow
/Maven
等平台,是从一些精选项目中提取出来的代码,具有较强的参考意义,能在一定程度帮忙到你。Path.getSymlinkTarget()
方法的具体详情如下:
包路径:ch.cyberduck.core.Path
类名称:Path
方法名:getSymlinkTarget
暂无
代码示例来源:origin: iterate-ch/cyberduck
@Override
public boolean resolve(final Path file) {
if(PreferencesFactory.get().getBoolean("path.symboliclink.resolve")) {
// Follow links instead
return false;
}
// Create symbolic link only if supported by the local file system
if(feature != null) {
final Path target = file.getSymlinkTarget();
// Only create symbolic link if target is included in the download
for(TransferItem root : files) {
if(this.findTarget(target, root.remote)) {
if(log.isDebugEnabled()) {
log.debug(String.format("Resolved target %s for %s", target, file));
}
// Create symbolic link
return true;
}
}
}
// Otherwise download target file
return false;
}
代码示例来源:origin: iterate-ch/cyberduck
for(final Path file : list) {
if(file.isSymbolicLink()) {
final Path target = file.getSymlinkTarget();
if(session.getClient().changeWorkingDirectory(file.getAbsolute())) {
file.setType(EnumSet.of(Path.Type.directory, Path.Type.symboliclink));
代码示例来源:origin: iterate-ch/cyberduck
file.getSymlinkTarget().getAbsolute());
if(log.isDebugEnabled()) {
log.debug(String.format("Create symbolic link from %s to %s", local, target));
代码示例来源:origin: iterate-ch/cyberduck
public AbstractEditor(final Application application,
final SessionPool session,
final Path file,
final ApplicationLauncher launcher,
final ApplicationFinder finder,
final ProgressListener listener) {
this.applicationLauncher = launcher;
this.applicationFinder = finder;
this.application = application;
if(file.isSymbolicLink() && PreferencesFactory.get().getBoolean("editor.upload.symboliclink.resolve")) {
this.remote = file.getSymlinkTarget();
}
else {
this.remote = file;
}
this.local = TemporaryFileServiceFactory.get().create(session.getHost().getUuid(), remote);
this.session = session;
this.listener = listener;
}
代码示例来源:origin: iterate-ch/cyberduck
if(file.isSymbolicLink()) {
final Path target = file.getSymlinkTarget();
代码示例来源:origin: iterate-ch/cyberduck
path = file.getSymlinkTarget().getAbsolute();
代码示例来源:origin: iterate-ch/cyberduck
@Override
public void visit(final AttributedList<Path> list, final int index, final Path file) {
if(l) {
if(file.isSymbolicLink()) {
console.printf("%n%sl%s\t%s\t%s -> %s%s",
Ansi.ansi().bold(),
file.attributes().getPermission().getSymbol(),
formatter.getMediumFormat(
file.attributes().getModificationDate()),
file.getName(), file.getSymlinkTarget().getAbsolute(),
Ansi.ansi().reset());
}
else {
console.printf("%n%s%s%s\t%s\t%s\t%s%s",
Ansi.ansi().bold(),
file.isDirectory() ? "d" : "-",
file.attributes().getPermission().getSymbol(),
formatter.getMediumFormat(
file.attributes().getModificationDate()),
StringUtils.isNotBlank(file.attributes().getRegion())
? file.attributes().getRegion() : StringUtils.EMPTY,
file.getName(),
Ansi.ansi().reset());
}
}
else {
console.printf("%n%s%s%s", Ansi.ansi().bold(), file.getName(), Ansi.ansi().reset());
}
}
内容来源于网络,如有侵权,请联系作者删除!