/** * @param parent the absolute directory * @param name the file relative to param path * @param type File type */ public Path(final Path parent, final String name, final EnumSet<Type> type) { this.type = type; this.attributes = new PathAttributes(); this.attributes.setRegion(parent.attributes.getRegion()); this._setPath(parent, name); }
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)); } }
for(final Container f : chunk) { final PathAttributes attributes = new PathAttributes(); attributes.setRegion(f.getRegion().getRegionId()); containers.add(new Path(String.format("/%s", f.getName()), EnumSet.of(Path.Type.volume, Path.Type.directory), attributes));
@Override public PathAttributes find(final Path file) throws BackgroundException { if(file.isRoot()) { return PathAttributes.EMPTY; } if(file.getType().contains(Path.Type.upload)) { return PathAttributes.EMPTY; } if(containerService.isContainer(file)) { final PathAttributes attributes = new PathAttributes(); attributes.setRegion(new S3LocationFeature(session, session.getClient().getRegionEndpointCache()).getLocation(file).getIdentifier()); return attributes; } return this.toAttributes(this.details(file)); }
final PathAttributes attr = attributes.toAttributes(object); attr.setRegion(bucket.attributes().getRegion()); if(null == delimiter) { file = new Path(String.format("%s%s", bucket.getAbsolute(), key), types, attr); file = new Path(directory, PathNormalizer.name(key), EnumSet.of(Path.Type.directory, Path.Type.placeholder), attributes); attributes.setRegion(bucket.attributes().getRegion()); children.add(file);
attributes.setRegion(bucket.attributes().getRegion()); if(marker instanceof S3Version) { final S3Version object = (S3Version) marker;
@Override public Path call() throws BackgroundException { final PathAttributes attributes = new PathAttributes(); attributes.setRegion(bucket.attributes().getRegion()); final Path prefix = new Path(String.format("%s%s", bucket.getAbsolute(), PathNormalizer.normalize(common)), EnumSet.of(Path.Type.directory, Path.Type.placeholder), attributes);
attr.setRegion(container.attributes().getRegion()); children.add(new Path(directory, PathNormalizer.name(object.getName()), types, attr)); marker = object.getName();
attributes.setRegion(dict.stringForKey("Region")); attributes.setStorageClass(dict.stringForKey("Storage Class")); final Object vaultObj = dict.objectForKey("Vault");
final PathAttributes attributes = new PathAttributes(); attributes.setSize(info.getTotalSize()); attributes.setRegion(info.getRegion().getRegionId()); return attributes;