Description
Is your feature request related to a problem? Please describe.
There doesn't seem to be a way to access a single item (file/folder) using the storage folder API. I realize I can find that file using GetItems
, but in a folder with many files, it would need to enumerate each one before finding the correct file. This has performance problems that only grow with the number of files in a folder.
Describe the solution you'd like
I already have the file name I'm looking for, so an addition to the storage folder api that allows me to access a single item with just the name. Something along the lines of Task<IStorageItem> GetItem(string name)
which does not enumerate through each item in the underlying directory.
Describe alternatives you've considered
There's a workaround where I can access an individual file using IStorageProvider.TryGetFileFromPathAsync
, but I need to manually build a full path and use the storage provider directly instead of the folder. It's also likely not as portable, so not as ideal as having this built-in.
Additional context
No response