/// <summary>
 /// Serialize a
 /// <see cref="INodeDirectory"/>
 /// </summary>
 /// <param name="node">The node to write</param>
 /// <param name="out">
 /// The
 /// <see cref="System.IO.DataOutput"/>
 /// where the fields are written
 /// </param>
 /// <exception cref="System.IO.IOException"/>
 public static void WriteINodeDirectory(INodeDirectory node, DataOutput @out)
 {
     WriteLocalName(node, @out);
     @out.WriteLong(node.GetId());
     @out.WriteShort(0);
     // replication
     @out.WriteLong(node.GetModificationTime());
     @out.WriteLong(0);
     // access time
     @out.WriteLong(0);
     // preferred block size
     @out.WriteInt(-1);
     // # of blocks
     WriteQuota(node.GetQuotaCounts(), @out);
     if (node.IsSnapshottable())
     {
         @out.WriteBoolean(true);
     }
     else
     {
         @out.WriteBoolean(false);
         @out.WriteBoolean(node.IsWithSnapshot());
     }
     WritePermissionStatus(node, @out);
 }