@Override public String getTooltip(final Path file) { final StringBuilder tooltip = new StringBuilder(file.getAbsolute()); final Checksum checksum = file.attributes().getChecksum(); if(Checksum.NONE != checksum) { tooltip.append("\n").append(String.format("%s %s", StringUtils.upperCase(checksum.algorithm.name()), checksum.hash)); } if(StringUtils.isNotBlank(file.attributes().getVersionId())) { tooltip.append("\n").append(file.attributes().getVersionId()); } return tooltip.toString(); } }
if(Objects.equals(attributes.getChecksum(), append.checksum)) { if(log.isInfoEnabled()) { log.info(String.format("Skip file %s with checksum %s", source, append.checksum));
if(Checksum.NONE != attributes.getChecksum()) { final ChecksumCompute compute = ChecksumComputeFactory.get(attributes.getChecksum().algorithm); if(compute.compute(local.getInputStream(), parent).equals(attributes.getChecksum())) { if(log.isInfoEnabled()) { log.info(String.format("Skip file %s with checksum %s", file, local.attributes().getChecksum()));
private void initChecksum() { if(this.numberOfFiles() > 1) { checksumField.setStringValue(String.format("(%s)", LocaleFactory.localizedString("Multiple files"))); } else { final Path file = this.getSelected(); final Checksum checksum = file.attributes().getChecksum(); if(Checksum.NONE == checksum) { checksumField.setStringValue(LocaleFactory.localizedString("Unknown")); } else { this.updateField(checksumField, checksum.hash, TRUNCATE_MIDDLE_ATTRIBUTES); } } }
@Override public Append append(final Path file, final Long length, final Cache<Path> cache) throws BackgroundException { if(finder.withCache(cache).find(file)) { final PathAttributes attr = attributes.withCache(cache).find(file); return new Append(attr.getSize()).withChecksum(attr.getChecksum()); } return Write.notfound; } }
/** * @return No Content-Range support */ @Override public Append append(final Path file, final Long length, final Cache<Path> cache) throws BackgroundException { if(length >= preferences.getLong("s3.upload.multipart.threshold")) { if(preferences.getBoolean("s3.upload.multipart")) { try { final List<MultipartUpload> upload = multipartService.find(file); if(!upload.isEmpty()) { Long size = 0L; for(MultipartPart completed : multipartService.list(upload.iterator().next())) { size += completed.getSize(); } return new Append(size); } } catch(AccessDeniedException | InteroperabilityException e) { log.warn(String.format("Ignore failure listing incomplete multipart uploads. %s", e.getDetail())); } } } if(finder.withCache(cache).find(file)) { final PathAttributes attr = attributes.withCache(cache).find(file); return new Append(false, true).withSize(attr.getSize()).withChecksum(attr.getChecksum()); } return Write.notfound; }
@Override public Append append(final Path file, final Long length, final Cache<Path> cache) throws BackgroundException { if(finder.withCache(cache).find(file)) { final PathAttributes attr = attributes.withCache(cache).find(file); return new Append(false, true).withSize(attr.getSize()).withChecksum(attr.getChecksum()); } return Write.notfound; }
@Override public Append append(final Path file, final Long length, final Cache<Path> cache) throws BackgroundException { if(finder.withCache(cache).find(file)) { final PathAttributes attributes = this.attributes.withCache(cache).find(file); return new Append(false, true).withSize(attributes.getSize()).withChecksum(attributes.getChecksum()); } return Write.notfound; }
@Override public Append append(final Path file, final Long length, final Cache<Path> cache) throws BackgroundException { if(finder.withCache(cache).find(file)) { final PathAttributes attr = this.attributes.withCache(cache).find(file); return new Append(false, true).withSize(attr.getSize()).withChecksum(attr.getChecksum()); } return Write.notfound; }
@Override public Append append(final Path file, final Long length, final Cache<Path> cache) throws BackgroundException { if(finder.withCache(cache).find(file)) { final PathAttributes attr = attributes.withCache(cache).find(file); return new Append(false, true).withSize(attr.getSize()).withChecksum(attr.getChecksum()); } return Write.notfound; }
@Override public Append append(final Path file, final Long length, final Cache<Path> cache) throws BackgroundException { if(finder.withCache(cache).find(file)) { final PathAttributes attributes = this.attributes.withCache(cache).find(file); return new Append(false, true).withSize(attributes.getSize()).withChecksum(attributes.getChecksum()); } return Write.notfound; }
@Override public Append append(final Path file, final Long length, final Cache<Path> cache) throws BackgroundException { if(finder.withCache(cache).find(file)) { final PathAttributes attr = attributes.withCache(cache).find(file); return new Append(false, true).withSize(attr.getSize()).withChecksum(attr.getChecksum()); } return Write.notfound; } }
@Override public Append append(final Path file, final Long length, final Cache<Path> cache) throws BackgroundException { if(finder.withCache(cache).find(file)) { final PathAttributes attr = attributes.withCache(cache).find(file); return new Append(false, true).withSize(attr.getSize()).withChecksum(attr.getChecksum()); } return Write.notfound; }
/** * Manta does not support raw append operations. */ @Override public Append append(final Path file, final Long length, final Cache<Path> cache) throws BackgroundException { if(finder.withCache(cache).find(file)) { final PathAttributes attr = attributes.withCache(cache).find(file); return new Append(false, true).withSize(attr.getSize()).withChecksum(attr.getChecksum()); } return Write.notfound; }
@Override public Append append(final Path file, final Long length, final Cache<Path> cache) throws BackgroundException { if(finder.withCache(cache).find(file)) { final PathAttributes attr = attributes.withCache(cache).find(file); return new Append(false, true).withSize(attr.getSize()).withChecksum(attr.getChecksum()); } return Write.notfound; }
@Override public Append append(final Path file, final Long length, final Cache<Path> cache) throws BackgroundException { if(finder.withCache(cache).find(file)) { final PathAttributes attr = attributes.withCache(cache).find(file); return new Append(false, true).withSize(attr.getSize()).withChecksum(attr.getChecksum()); } return Write.notfound; }
@Override public Append append(final Path file, final Long length, final Cache<Path> cache) throws BackgroundException { if(length >= preferences.getLong("b2.upload.largeobject.threshold")) { if(preferences.getBoolean("b2.upload.largeobject")) { final B2LargeUploadPartService partService = new B2LargeUploadPartService(session, fileid); final List<B2FileInfoResponse> upload = partService.find(file); if(!upload.isEmpty()) { Long size = 0L; for(B2UploadPartResponse completed : partService.list(upload.iterator().next().getFileId())) { size += completed.getContentLength(); } return new Append(size); } } } if(finder.withCache(cache).find(file)) { final PathAttributes attributes = this.attributes.withCache(cache).find(file); return new Append(false, true).withSize(attributes.getSize()).withChecksum(attributes.getChecksum()); } return Write.notfound; } }
@Override public Append append(final Path file, final Long length, final Cache<Path> cache) throws BackgroundException { if(finder.withCache(cache).find(vault.encrypt(session, file))) { final PathAttributes attributes = this.attributes.withCache(cache).find(vault.encrypt(session, file)); return new Append(false, true).withSize(attributes.getSize()).withChecksum(attributes.getChecksum()); } return Write.notfound; }
@Override public Append append(final Path file, final Long length, final Cache<Path> cache) throws BackgroundException { if(length >= preferences.getLong("openstack.upload.largeobject.threshold")) { if(preferences.getBoolean("openstack.upload.largeobject")) { long size = 0L; final List<Path> segments = listService.list(segmentService.getSegmentsDirectory(file, length), new DisabledListProgressListener()).toList(); if(segments.isEmpty()) { return Write.notfound; } for(Path segment : segments) { size += segment.attributes().getSize(); } return new Append(size); } } if(finder.withCache(cache).find(file)) { final PathAttributes attr = attributes.withCache(cache).find(file); return new Append(false, true).withSize(attr.getSize()).withChecksum(attr.getChecksum()); } return Write.notfound; }
status.setChecksum(source.attributes().getChecksum()); if(parent.isExists()) {