public virtual object FindFirst(RemotePath path, out FindData findData) { var enumerable = GetFiles(path); if (enumerable != null) { var enumerator = enumerable.GetEnumerator(); if (enumerator.MoveNext()) { findData = enumerator.Current; return(enumerator); } } // empty list findData = null; return(null); }
public virtual bool FindNext(ref object o, out FindData findData) { if (o is IEnumerator <FindData> fsEnum) { if (fsEnum.MoveNext()) { var current = fsEnum.Current; if (current != null) { findData = current; return(true); } } } // end of sequence findData = null; return(false); }