public TreeIndex(string filePath, ObjectStorage <T> dataStorage, IComparer <T> comparer, bool duplicable = false) { _indexStorage = new ObjectStorage <IndexNode>(filePath);//, FileMode.Create); _indexStorage.Initialize(); _dataStorage = dataStorage; _duplicable = duplicable; _comparer = comparer; var firstOffset = _indexStorage.FirstOffset; _root = firstOffset > 0 ? new Node <T>(firstOffset, null, _indexStorage, _dataStorage, _duplicable) : null; }