public IEnumerator <string> GetEnumerator()
        {
            var visitState = new VisitState();

            OnStart();

            if (_directoryReader.IsFile(_path))
            {
                if (VisitFile(_path, visitState) == _path)
                {
                    yield return(_path);
                }
            }
            else if (_directoryReader.IsDirectory(_path))
            {
                foreach (var path in VisitDirectory(_path, visitState))
                {
                    yield return(path);

                    if (visitState.SearchFinished)
                    {
                        break;
                    }
                }
            }

            visitState.SearchFinished = true;

            OnFinish();
        }