/// <inheritdoc />
        public async Task <IList <IFile> > GetFilesAsync(string searchPattern = "*", FolderSearchOption searchOption = FolderSearchOption.TopFolderOnly, CancellationToken cancellationToken = default(CancellationToken))
        {
            await AwaitExtensions.SwitchOffMainThreadAsync(cancellationToken);

            EnsureExists();
            return(Directory.GetFiles(Path, searchPattern, (SearchOption)searchOption).Select(f => new DefaultFileImplementation(f)).ToList <IFile>().AsReadOnly());
        }
Example #2
0
 /// <inheritdoc />
 public Task <IList <IFile> > GetFilesAsync(string searchPattern = "*", FolderSearchOption searchOption = FolderSearchOption.TopFolderOnly, CancellationToken cancellationToken = default(CancellationToken)) => _folder.GetFilesAsync(searchPattern, searchOption, cancellationToken);
 /// <inheritdoc />
 public IList <IFile> GetFiles(string searchPattern = "*", FolderSearchOption searchOption = FolderSearchOption.TopFolderOnly)
 {
     EnsureExists();
     return(Directory.GetFiles(Path, searchPattern, (SearchOption)searchOption).Select(f => new DefaultFileImplementation(f)).ToList <IFile>().AsReadOnly());
 }
Example #4
0
 /// <inheritdoc />
 public IList <IFile> GetFiles(string searchPattern = "*", FolderSearchOption searchOption = FolderSearchOption.TopFolderOnly) => _folder.GetFiles(searchPattern, searchOption);