public void GetFileInfosLimitCount() { var files = FileLinq.GetFileInfosLimited(Environment.GetFolderPath(Environment.SpecialFolder.MyDocuments), 10); Assert.IsTrue(files.Count() == 10); }
public static IEnumerable <Mp3Info> GetMp3InfoLimitedWhere(string path, Func <Mp3Info, bool> predicate, int limit = 0) => FileLinq.GetFileInfosLimited(path, limit, Mp3Filter) .Select(fileInfo => new Mp3Info(fileInfo)) .Where(predicate);
public void GetFileInfosAny() { var files = FileLinq.GetFileInfosLimited(Environment.GetFolderPath(Environment.SpecialFolder.MyDocuments)); Assert.IsTrue(files.Any()); }
public static IEnumerable <Mp3Info> GetMp3InfoLimited(string path, int limit = 0) => FileLinq.GetFileInfosLimited(path, limit, Mp3Filter) .Select(fileInfo => new Mp3Info(fileInfo));