/// <summary>
 /// Serialize an
 /// <see cref="INodeFileAttributes"/>
 /// .
 /// </summary>
 /// <exception cref="System.IO.IOException"/>
 public static void WriteINodeFileAttributes(INodeFileAttributes file, DataOutput
                                             @out)
 {
     WriteLocalName(file, @out);
     WritePermissionStatus(file, @out);
     @out.WriteLong(file.GetModificationTime());
     @out.WriteLong(file.GetAccessTime());
     @out.WriteShort(file.GetFileReplication());
     @out.WriteLong(file.GetPreferredBlockSize());
 }
Esempio n. 2
0
            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);
            }
Esempio n. 3
0
 public virtual bool MetadataEquals(INodeFileAttributes other)
 {
     return(other != null && GetHeaderLong() == other.GetHeaderLong() && GetPermissionLong
                () == other.GetPermissionLong() && GetAclFeature() == other.GetAclFeature() && GetXAttrFeature
                () == other.GetXAttrFeature());
 }
Esempio n. 4
0
 public abstract bool MetadataEquals(INodeFileAttributes other);