/// <summary> /// Read all files. /// </summary> /// <param name="fs">Target filesystem.</param> /// <param name="path">Path of directory.</param> public static MochaReader <MochaFile> ReadFiles(this MochaFileSystem fs, MochaPath path) => new MochaReader <MochaFile>(fs.GetFiles(path));
/// <summary> /// Read all files. /// </summary> /// <param name="fs">Target filesystem.</param> /// <param name="path">Path of directory.</param> /// <param name="query">Query for filtering.</param> public static MochaReader <MochaFile> ReadFiles(this MochaFileSystem fs, MochaPath path, Func <MochaFile, bool> query) => new MochaReader <MochaFile>(fs.GetFiles(path).Where(query));
/// <summary> /// Returns all files. /// </summary> /// <param name="fs">Target filesystem.</param> /// <param name="path">Path of directory.</param> /// <param name="query">Query for filtering.</param> public static MochaCollectionResult <MochaFile> GetFiles(this MochaFileSystem fs, MochaPath path, Func <MochaFile, bool> query) => new MochaCollectionResult <MochaFile>(fs.GetFiles(path).Where(query));