-
Notifications
You must be signed in to change notification settings - Fork 717
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
StorageFileHelper - Add GetFilesInDirectoryAsync #16341
base: master
Are you sure you want to change the base?
Conversation
@nickrandolph Can you confirm if you agree with the code? |
🤖 Your WebAssembly Sample App stage site is ready! Visit it here: https://unowasmprstaging.z20.web.core.windows.net/pr-16341/index.html |
🤖 Your Docs stage site is ready! Visit it here: https://unodocsprstaging.z13.web.core.windows.net/pr-16341/index.html |
@jeromelaban one of the questions we had here is whether we can make StorageFileHelper public. We need to access it, so we can either make it public or internal, with internals access granted to the appropriate library. Thoughts? |
/// </summary> | ||
/// <param name="extensionsFilter">An array of strings representing the file extensions to filter the files.If null, all files in the directory are considered.</param> | ||
/// <returns>An array of strings containing the paths of the filtered files within the directory.</returns> | ||
public static async Task<string[]> GetFilesInDirectoryAsync(string[] extensionsFilter) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Use Folder
instead of Directory
to preserve WinUI convention
I think |
What do you need from storage helper? |
GitHub Issue (If applicable): closes #
PR Type
What kind of change does this PR introduce?
What is the current behavior?
The StorageFileHelper just have one method for Determines if an asset or resource exists within application package.
But could be a nice feature to retrieves the paths of files within a directory.
What is the new behavior?
So this PR is for allow to retrieves the paths of files within a directory based on a specified filter for file extensions (If null, all files in the directory are considered.)
And the result is an array of strings containing the paths of the filtered files within the directory.
PR Checklist
Please check if your PR fulfills the following requirements:
Screenshots Compare Test Run
results.Other information
Internal Issue (If applicable):