本文整理了Java中ch.cyberduck.core.Path.isRoot()
方法的一些代码示例,展示了Path.isRoot()
的具体用法。这些代码示例主要来源于Github
/Stackoverflow
/Maven
等平台,是从一些精选项目中提取出来的代码,具有较强的参考意义,能在一定程度帮忙到你。Path.isRoot()
方法的具体详情如下:
包路径:ch.cyberduck.core.Path
类名称:Path
方法名:isRoot
暂无
代码示例来源:origin: iterate-ch/cyberduck
@Override
public boolean isSupported(final Path workdir) {
// Creating files is only possible inside a bucket.
return !workdir.isRoot();
}
代码示例来源:origin: iterate-ch/cyberduck
@Override
public boolean isSupported(final Path workdir) {
// Creating files is only possible inside a container.
return !workdir.isRoot();
}
代码示例来源:origin: iterate-ch/cyberduck
@Override
public boolean isSupported(final Path workdir, final String name) {
if(workdir.isRoot()) {
return false;
}
return true;
}
}
代码示例来源:origin: iterate-ch/cyberduck
public Path getParent() {
if(this.isRoot()) {
return this;
}
return parent;
}
代码示例来源:origin: iterate-ch/cyberduck
@Override
public boolean isSupported(final Path workdir) {
// Creating files is only possible inside a bucket.
return !workdir.isRoot();
}
代码示例来源:origin: iterate-ch/cyberduck
@Override
public boolean isSupported(final Path workdir) {
// Creating files is only possible inside a bucket.
return !workdir.isRoot();
}
代码示例来源:origin: iterate-ch/cyberduck
@Override
public boolean isSupported(final Path workdir) {
if(workdir.isRoot()) {
return false;
}
return true;
}
}
代码示例来源:origin: iterate-ch/cyberduck
public boolean isContainer(final Path file) {
if(file.isRoot()) {
return false;
}
return file.getParent().isRoot();
}
代码示例来源:origin: iterate-ch/cyberduck
@Override
public boolean isSupported(final Path source, final Path target) {
if(target.isRoot()) {
return false;
}
return !source.getType().contains(Path.Type.placeholder);
}
}
代码示例来源:origin: iterate-ch/cyberduck
@Override
public boolean isSupported(final Path source, final Path target) {
if(target.isRoot()) {
return false;
}
return !source.getType().contains(Path.Type.placeholder);
}
}
代码示例来源:origin: iterate-ch/cyberduck
/**
* @return the path relative to its parent directory
*/
@Override
public String getName() {
if(this.isRoot()) {
return String.valueOf(DELIMITER);
}
final String abs = this.getAbsolute();
int index = abs.lastIndexOf(DELIMITER);
return abs.substring(index + 1);
}
代码示例来源:origin: iterate-ch/cyberduck
@Override
public String getKey(final Path file) {
final String key = super.getKey(file);
if(!file.isRoot() && !this.isContainer(file) && file.isDirectory()) {
return key.concat(String.valueOf(Path.DELIMITER)).concat(PLACEHOLDER);
}
return key;
}
}
代码示例来源:origin: iterate-ch/cyberduck
@Override
public String getKey(final Path file) {
final String key = super.getKey(file);
if(!file.isRoot() && !this.isContainer(file) && file.isDirectory()) {
return key.concat(String.valueOf(Path.DELIMITER));
}
return key;
}
}
代码示例来源:origin: iterate-ch/cyberduck
@Override
public boolean isSupported(final Path workdir) {
if(workdir.isRoot()) {
return false;
}
// for existing files the delete role is also needed but at this point we don't know if it exists or not
return new SDSPermissionsFeature(session, nodeid).containsRole(workdir, SDSPermissionsFeature.CREATE_ROLE);
}
代码示例来源:origin: iterate-ch/cyberduck
@Override
public String getKey(final Path file) {
final String key = super.getKey(file);
if(!file.isRoot() && !this.isContainer(file) && file.isDirectory()) {
return key.concat(String.valueOf(Path.DELIMITER));
}
return key;
}
}
代码示例来源:origin: iterate-ch/cyberduck
public String encode(final Path file) {
final String encoded = URIEncoder.encode(file.getAbsolute());
if(file.isDirectory()) {
if(file.isRoot()) {
return encoded;
}
return String.format("%s/", encoded);
}
return encoded;
}
}
代码示例来源:origin: iterate-ch/cyberduck
@Override
public AttributedList<Path> list(final Path directory, final ListProgressListener listener) throws BackgroundException {
if(directory.isRoot()) {
return new AzureContainerListService(session, context).list(directory, listener);
}
else {
return new AzureObjectListService(session, context).list(directory, listener);
}
}
代码示例来源:origin: iterate-ch/cyberduck
@Override
public String getFileid(final Path file, final ListProgressListener listener) throws BackgroundException {
if(StringUtils.isNotBlank(file.attributes().getVersionId())) {
return file.attributes().getVersionId();
}
if(file.isRoot()) {
return null;
}
return new S3AttributesFinderFeature(session).find(file).getVersionId();
}
代码示例来源:origin: iterate-ch/cyberduck
@Override
public AttributedList<Path> list(final Path directory, final ListProgressListener listener) throws BackgroundException {
if(directory.isRoot()) {
return new S3BucketListService(session, new S3LocationFeature.S3Region(session.getHost().getRegion())).list(directory, listener);
}
return new S3ObjectListService(session).list(directory, listener);
}
代码示例来源:origin: iterate-ch/cyberduck
@Override
public AttributedList<Path> list(final Path directory, final ListProgressListener listener) throws BackgroundException {
if(directory.isRoot()) {
return new SwiftContainerListService(session,
new SwiftLocationFeature.SwiftRegion(session.getHost().getRegion())).list(directory, listener);
}
else {
return new SwiftObjectListService(session, regionService).list(directory, listener);
}
}
内容来源于网络,如有侵权,请联系作者删除!