Beagrep.Daemon.BuildIndex.DocumentToDirent C# (CSharp) Метод

DocumentToDirent() приватный статический Метод

private static DocumentToDirent ( Lucene.Net.Documents.Document doc ) : Dirent
doc Lucene.Net.Documents.Document
Результат Dirent
        private static Dirent DocumentToDirent(Document doc)
        {
            string path;
                        bool is_dir = false;

                        path = doc.Get ("Uri");

                        string prop_key = "prop:k:" + Property.IsDirectoryPropKey;
                        foreach (Field f in doc.Fields ()) {
                                if (f.Name () != prop_key)
                                        continue;

                                // Format of fields: from LuceneCommon.cs:AddPropertyToDocument
                                is_dir = (f.StringValue ().Substring (3) == "true");
                                break;
                        }

                        //Logger.Log.Debug ("Found: " + path + " (" + is_dir + ")");
                        return new Dirent (path, is_dir);
        }