WindowsAppSDK icon indicating copy to clipboard operation
WindowsAppSDK copied to clipboard

Allow UWP apps to get hidden folders and files inside an accessible folder

Open jaigak opened this issue 4 years ago • 6 comments

Proposal: Allow UWP apps to get hidden folders and files inside an accessible folder

Today GetFileAsync and GetFolderAsync will not work for hidden files. Please provide a way to get them since some apps may need them.

Summary

Modify GetFileAsync and GetFolderAsync to return hidden item instead of file not found. GetFilesAsync, GetFoldersAsync, and search query would not get affected and should not return hidden items.

Rationale

  • Apps that need access to specific hidden items can do now

Scope

Capability Priority
This proposal will allow developers to access hidden items only if they know the name Must
This proposal will allow developers to enumerate all hidden items in a folder Won't

jaigak avatar Jan 07 '21 04:01 jaigak

@ptorr-msft - should we fold this into any of the existing file access asks?

stevewri avatar Jan 11 '21 20:01 stevewri

Maybe enumeration support for hidden files can be added with a capability

jaigak avatar Jan 13 '21 04:01 jaigak

@Jaiganeshkumaran ..FromApp APIs do work for hidden files. It seems what you are asking is these mentioned StorageFile/StorageFolder APIs to work as well.

soumyamahunt avatar Jul 11 '21 13:07 soumyamahunt

@Jaiganeshkumaran Rewrite your proposal title with "Allow Storage APIs" instead of "Allow UWP apps" as most WinAPIs are Window types agnostic by design.

ghost avatar Dec 10 '21 04:12 ghost

What is your motivation for using StorageFile?

ptorr-msft avatar Dec 11 '21 00:12 ptorr-msft

For Trust Issues/Security, the less Full Trust app in usage the better. now please don't ask what's the motivation for security as well.

Side Note : The vast majority of windows desktop devs don't bother with AppContainer, because you guys haven't made the features they need; available to use within AppContainer. so they are forced to use Full Trust. It's astonishing to see that how you guys are ignoring/downplaying AppContainer/Security scenarios.

ghost avatar Dec 17 '21 06:12 ghost

What is your motivation for using StorageFile?

For me:

  1. StorageFile/Folder API has a safe Rust API: https://microsoft.github.io/windows-docs-rs/doc/windows/Storage/struct.StorageFolder.html#method.GetFilesAsync vs https://microsoft.github.io/windows-docs-rs/doc/windows/Win32/Storage/FileSystem/fn.FindFirstFileA.html
  2. Compare the developer experience for using the WinRT Storage API vs Win32 Storage API (not even async yet): https://learn.microsoft.com/en-us/windows/win32/fileio/listing-the-files-in-a-directory vs https://learn.microsoft.com/de-de/uwp/api/windows.storage.storagefolder.getfoldersasync?view=winrt-26100

So for now, I will tokio rather using the Windows API directly.

Rustacian avatar Feb 08 '25 14:02 Rustacian

Why was it closed?

Rustacian avatar Jun 02 '25 21:06 Rustacian

Hi, thank you for your question!

The Windows App SDK is focused on desktop-based project types and does not support UWP. We recommend checking out the new Microsoft.Windows.Storage.Pickers API, which may offer the functionality you're looking for.

ssparach avatar Jul 03 '25 17:07 ssparach

If I understand it correctly, this API is not accessible via https://github.com/microsoft/windows-rs , but only via https://github.com/microsoft/windows-app-rs , isn't it? Sadly, the latter has been deprecated...

Rustacian avatar Jul 03 '25 18:07 Rustacian