public static FsImageProto.INodeSection.INodeFile.Builder BuildINodeFile(INodeFileAttributes file, FSImageFormatProtobuf.SaverContext state) { FsImageProto.INodeSection.INodeFile.Builder b = FsImageProto.INodeSection.INodeFile .NewBuilder().SetAccessTime(file.GetAccessTime()).SetModificationTime(file.GetModificationTime ()).SetPermission(BuildPermissionStatus(file, state.GetStringMap())).SetPreferredBlockSize (file.GetPreferredBlockSize()).SetReplication(file.GetFileReplication()).SetStoragePolicyID (file.GetLocalStoragePolicyID()); AclFeature f = file.GetAclFeature(); if (f != null) { b.SetAcl(BuildAclEntries(f, state.GetStringMap())); } XAttrFeature xAttrFeature = file.GetXAttrFeature(); if (xAttrFeature != null) { b.SetXAttrs(BuildXAttrs(xAttrFeature, state.GetStringMap())); } return(b); }
public virtual bool MetadataEquals(INodeFileAttributes other) { return(other != null && GetHeaderLong() == other.GetHeaderLong() && GetPermissionLong () == other.GetPermissionLong() && GetAclFeature() == other.GetAclFeature() && GetXAttrFeature () == other.GetXAttrFeature()); }