Exemplo n.º 1
0
 /// <exception cref="System.IO.IOException"/>
 private void DumpINodeSection(InputStream @in)
 {
     FsImageProto.INodeSection s = FsImageProto.INodeSection.ParseDelimitedFrom(@in);
     @out.Write("<INodeSection>");
     O("lastInodeId", s.GetLastInodeId());
     for (int i = 0; i < s.GetNumInodes(); ++i)
     {
         FsImageProto.INodeSection.INode p = FsImageProto.INodeSection.INode.ParseDelimitedFrom
                                                 (@in);
         @out.Write("<inode>");
         O("id", p.GetId()).O("type", p.GetType()).O("name", p.GetName().ToStringUtf8());
         if (p.HasFile())
         {
             DumpINodeFile(p.GetFile());
         }
         else
         {
             if (p.HasDirectory())
             {
                 DumpINodeDirectory(p.GetDirectory());
             }
             else
             {
                 if (p.HasSymlink())
                 {
                     DumpINodeSymlink(p.GetSymlink());
                 }
             }
         }
         @out.Write("</inode>\n");
     }
     @out.Write("</INodeSection>\n");
 }