本文整理了Java中ch.cyberduck.core.Path.setType()
方法的一些代码示例,展示了Path.setType()
的具体用法。这些代码示例主要来源于Github
/Stackoverflow
/Maven
等平台,是从一些精选项目中提取出来的代码,具有较强的参考意义,能在一定程度帮忙到你。Path.setType()
方法的具体详情如下:
包路径:ch.cyberduck.core.Path
类名称:Path
方法名:setType
暂无
代码示例来源:origin: iterate-ch/cyberduck
@Override
public void callback(final int returncode, final Path file) {
file.setType(selected.getType());
callback.callback(Collections.singletonMap(selected, file));
}
代码示例来源:origin: iterate-ch/cyberduck
@Override
public void callback(final int returncode, final Path file) {
file.setType(EnumSet.of(Path.Type.directory));
callback.callback(file, this.getLocation());
}
代码示例来源:origin: iterate-ch/cyberduck
protected boolean post(final java.nio.file.Path path, final Path file) {
if(Files.isSymbolicLink(path)) {
final Path target;
Path.Type type;
try {
target = new Path(path.toRealPath().toString(), EnumSet.of(Path.Type.file));
if(Files.isDirectory(path.toRealPath())) {
type = Path.Type.directory;
}
else {
type = Path.Type.file;
}
file.setType(EnumSet.of(Path.Type.symboliclink, type));
target.setType(EnumSet.of(type));
file.setSymlinkTarget(target);
}
catch(IOException e) {
log.warn(String.format("Failure to read symbolic link of %s. %s", file, e.getMessage()));
return false;
}
}
return true;
}
}
代码示例来源:origin: iterate-ch/cyberduck
final Path target = file.getSymlinkTarget();
if(session.getClient().changeWorkingDirectory(file.getAbsolute())) {
file.setType(EnumSet.of(Path.Type.directory, Path.Type.symboliclink));
target.setType(EnumSet.of(Path.Type.directory));
file.setType(EnumSet.of(Path.Type.directory, Path.Type.symboliclink));
target.setType(EnumSet.of(Path.Type.directory));
file.setType(EnumSet.of(Path.Type.file, Path.Type.symboliclink));
target.setType(EnumSet.of(Path.Type.file));
代码示例来源:origin: iterate-ch/cyberduck
private void setPath(final String absolute) {
if(String.valueOf(Path.DELIMITER).equals(absolute)) {
this._setPath(null, absolute);
}
else {
final Path parent = new Path(PathNormalizer.parent(absolute, Path.DELIMITER), EnumSet.of(Type.directory));
parent.attributes().setRegion(attributes.getRegion());
if(parent.isRoot()) {
parent.setType(EnumSet.of(Type.volume, Type.directory));
}
this._setPath(parent, PathNormalizer.name(absolute));
}
}
代码示例来源:origin: iterate-ch/cyberduck
@Override
public void callback(final int returncode, final Path file) {
file.setType(EnumSet.of(Path.Type.directory));
final VaultCredentials credentials = new VaultCredentials(passwordField.stringValue()).withSaved(this.isSuppressed());
callback.callback(file, this.getLocation(), credentials);
}
代码示例来源:origin: iterate-ch/cyberduck
attr = PathAttributes.EMPTY;
file.setType(EnumSet.of(Path.Type.symboliclink, type));
target.setType(EnumSet.of(type));
target.setAttributes(attr);
file.setSymlinkTarget(target);
代码示例来源:origin: iterate-ch/cyberduck
switch(f.getType()) {
case FTPFile.SYMBOLIC_LINK_TYPE:
parsed.setType(EnumSet.of(Path.Type.file, Path.Type.symboliclink));
内容来源于网络,如有侵权,请联系作者删除!