From 8b8741efd82c3d093af8f1fd9da5c78a93d461f3 Mon Sep 17 00:00:00 2001 From: Aragas Date: Fri, 7 Apr 2017 02:55:16 +0300 Subject: [PATCH] Fixed GetFiles --- common/CommonAssemblyInfo.cs | 4 ++-- common/PCLExt.FileStorage.nuspec | 2 +- src/PCLExt.FileStorage.Abstractions/IFolder.cs | 4 ++-- src/PCLExt.FileStorage.Desktop/FileSystemFolder.cs | 4 ++-- src/PCLExt.FileStorage/BaseFolder.cs | 4 ++-- 5 files changed, 9 insertions(+), 9 deletions(-) diff --git a/common/CommonAssemblyInfo.cs b/common/CommonAssemblyInfo.cs index 7d545b5..e4944f5 100644 --- a/common/CommonAssemblyInfo.cs +++ b/common/CommonAssemblyInfo.cs @@ -7,5 +7,5 @@ [assembly: AssemblyTrademark("")] [assembly: AssemblyCulture("")] -[assembly: AssemblyVersion("1.1.2.0")] -[assembly: AssemblyFileVersion("1.1.2.0")] +[assembly: AssemblyVersion("1.1.3.0")] +[assembly: AssemblyFileVersion("1.1.3.0")] diff --git a/common/PCLExt.FileStorage.nuspec b/common/PCLExt.FileStorage.nuspec index b70dced..962482b 100644 --- a/common/PCLExt.FileStorage.nuspec +++ b/common/PCLExt.FileStorage.nuspec @@ -2,7 +2,7 @@ PCLExt.FileStorage - 1.1.2.0 + 1.1.3.0 PCL Extension - File Storage API Daniel Plaisted,Aragas Aragas diff --git a/src/PCLExt.FileStorage.Abstractions/IFolder.cs b/src/PCLExt.FileStorage.Abstractions/IFolder.cs index 6de9c39..531e74e 100644 --- a/src/PCLExt.FileStorage.Abstractions/IFolder.cs +++ b/src/PCLExt.FileStorage.Abstractions/IFolder.cs @@ -86,7 +86,7 @@ public interface IFolder /// /// /// A list of the files in the folder - IList GetFiles(string searchPattern = "", FolderSearchOption searchOption = FolderSearchOption.TopFolderOnly); + IList GetFiles(string searchPattern = "*", FolderSearchOption searchOption = FolderSearchOption.TopFolderOnly); /// /// Gets a list of the files in this folder @@ -95,7 +95,7 @@ public interface IFolder /// /// The cancellation token. /// A list of the files in the folder - Task> GetFilesAsync(string searchPattern = "", FolderSearchOption searchOption = FolderSearchOption.TopFolderOnly, CancellationToken cancellationToken = default(CancellationToken)); + Task> GetFilesAsync(string searchPattern = "*", FolderSearchOption searchOption = FolderSearchOption.TopFolderOnly, CancellationToken cancellationToken = default(CancellationToken)); /// /// Creates a subfolder in this folder diff --git a/src/PCLExt.FileStorage.Desktop/FileSystemFolder.cs b/src/PCLExt.FileStorage.Desktop/FileSystemFolder.cs index 1a358d8..ae57628 100644 --- a/src/PCLExt.FileStorage.Desktop/FileSystemFolder.cs +++ b/src/PCLExt.FileStorage.Desktop/FileSystemFolder.cs @@ -152,13 +152,13 @@ public IFile GetFile(string name) } /// - public IList GetFiles(string searchPattern = "", FolderSearchOption searchOption = FolderSearchOption.TopFolderOnly) + public IList GetFiles(string searchPattern = "*", FolderSearchOption searchOption = FolderSearchOption.TopFolderOnly) { EnsureExists(); return Directory.GetFiles(Path, searchPattern, (SearchOption) searchOption).Select(f => new FileSystemFile(f)).ToList().AsReadOnly(); } /// - public async Task> GetFilesAsync(string searchPattern = "", FolderSearchOption searchOption = FolderSearchOption.TopFolderOnly, CancellationToken cancellationToken = default(CancellationToken)) + public async Task> GetFilesAsync(string searchPattern = "*", FolderSearchOption searchOption = FolderSearchOption.TopFolderOnly, CancellationToken cancellationToken = default(CancellationToken)) { await AwaitExtensions.SwitchOffMainThreadAsync(cancellationToken); diff --git a/src/PCLExt.FileStorage/BaseFolder.cs b/src/PCLExt.FileStorage/BaseFolder.cs index 066a42a..36b7c78 100644 --- a/src/PCLExt.FileStorage/BaseFolder.cs +++ b/src/PCLExt.FileStorage/BaseFolder.cs @@ -33,9 +33,9 @@ protected BaseFolder(string path) : this(FileSystem.GetFolderFromPath(path)) { } public Task GetFileAsync(string name, CancellationToken cancellationToken = default(CancellationToken)) => _folder.GetFileAsync(name, cancellationToken); /// - public IList GetFiles(string searchPattern = "", FolderSearchOption searchOption = FolderSearchOption.TopFolderOnly) => _folder.GetFiles(searchPattern, searchOption); + public IList GetFiles(string searchPattern = "*", FolderSearchOption searchOption = FolderSearchOption.TopFolderOnly) => _folder.GetFiles(searchPattern, searchOption); /// - public Task> GetFilesAsync(string searchPattern = "", FolderSearchOption searchOption = FolderSearchOption.TopFolderOnly, CancellationToken cancellationToken = default(CancellationToken)) => _folder.GetFilesAsync(searchPattern, searchOption, cancellationToken); + public Task> GetFilesAsync(string searchPattern = "*", FolderSearchOption searchOption = FolderSearchOption.TopFolderOnly, CancellationToken cancellationToken = default(CancellationToken)) => _folder.GetFilesAsync(searchPattern, searchOption, cancellationToken); /// public IFile CreateFile(string desiredName, CreationCollisionOption option) => _folder.CreateFile(desiredName, option);