showDirectoryPicker() to display directory path

Viewed 337

I am using window.showDirectoryPicker() to retrieve and save directory handle to IndexedDB.

My question - is there a way to display the whole path of the selected directory? (not just the directory name)

Thanks!

Reference: https://web.dev/file-system-access/

1 Answers

No you can't. That's a frequently asked feature but the privacy risks are too high for the specs authors to allow this.

Maybe the feature proposed in #156 could help for your use case, as it aims at exposing a web-API able to open the folder where your handle lives using the OS file manager. However even this is not going to be ready soon...

Related