/// <summary>
/// Update the DirCache with the contents of <seealso cref="Entries"/>.
/// <para />
/// This method should be invoked only during an implementation of
/// <seealso cref="finish()"/>, and only after <seealso cref="Entries"/> is sorted.
/// </summary>
protected void Replace()
{
if (_entryCnt < _entries.Length / 2)
{
var n = new DirCacheEntry[_entryCnt];
Array.Copy(_entries, 0, n, 0, _entryCnt);
_entries = n;
}
_cache.replace(_entries, _entryCnt);
}