if(version.isDeleteMarker()) { attributes.setCustom(ImmutableMap.of(KEY_DELETE_MARKER, Boolean.TRUE.toString())); attributes.setDuplicate(true); StringUtils.EMPTY, 1, null, false); if(unversioned.getObjects().length == 0) { attributes.setDuplicate(true);
if(revisions.keySet().contains(info.getFileName())) { attributes.setDuplicate(true); revision = revisions.get(info.getFileName()) + 1L;
/** * @param response List filenames response from server * @return Null when respone filename is not child of working directory directory */ protected PathAttributes parse(final B2FileInfoResponse response) { final PathAttributes attributes = new PathAttributes(); attributes.setChecksum( Checksum.parse(StringUtils.removeStart(StringUtils.lowerCase(response.getContentSha1(), Locale.ROOT), "unverified:")) ); final long timestamp = response.getUploadTimestamp(); if(response.getFileInfo().containsKey(X_BZ_INFO_SRC_LAST_MODIFIED_MILLIS)) { attributes.setModificationDate(Long.valueOf(response.getFileInfo().get(X_BZ_INFO_SRC_LAST_MODIFIED_MILLIS))); } else { attributes.setModificationDate(timestamp); } attributes.setVersionId(response.getFileId()); switch(response.getAction()) { case hide: // File version marking the file as hidden, so that it will not show up in b2_list_file_names case start: // Large file has been started, but not finished or canceled attributes.setDuplicate(true); attributes.setSize(-1L); break; default: attributes.setSize(response.getSize()); } return attributes; }
attributes.setDuplicate((marker.isDeleteMarker() && marker.isLatest()) || !marker.isLatest()); if(marker.isDeleteMarker()) { attributes.setCustom(Collections.singletonMap(KEY_DELETE_MARKER, Boolean.TRUE.toString()));
if(f.getExplicitlyTrashed()) { attributes.setDuplicate(true);
final String duplicateObj = dict.stringForKey("Duplicate"); if(duplicateObj != null) { attributes.setDuplicate(Boolean.valueOf(duplicateObj));