5 ms·
Agreed, people want permission based file system access and so I don't see why a site can't prompt a user to store a file in a user-specified location. If they
by encryptluks2 4y ago
Agreed, people want permission based file system access and so I don't see why a site can't prompt a user to store a file in a user-specified location. If they clear their site settings then giving permission to the same file should retain their data. I don't want to have to worry about losing something important or having my browser act as a file system.
- mr_toad 4y ago> I don't see why a site can't prompt a user to store a file in a user-specified location. This is already possible with the file system access API. Clearing site data has no impact on these files. But you do have to re-grant permission every time you reload the page. https://developer.mozilla.org/en-US/docs/Web/API/File_System_Access_API https://developer.mozilla.org/en-US/docs/Web/API/File_System...
- encryptluks2 4y agoTherein lies the problem, because it should only re-prompt for permission only when you clear the site settings. Additionally, as far as I'm aware or at least last time I checked this doesn't enable directory based permissions, so a web IDE wouldn't be able to browser a directory or sub-directories after given permission.
- 8n4vidtmkvmk 4y ago> Additionally, as far as I'm aware or at least last time I checked this doesn't enable directory based permissions, I haven't tried it yet, but I thought it did.. the first 3 paragraphs of the comment you're responding to all mention directories > This API allows interaction with files on a user's local device, or on a user-accessible network file system. Core functionality of this API includes reading files, writing or saving files, and access to directory structure. > Most of the interaction with files and directories is accomplished through handles. A parent FileSystemHandle class helps define two child classes: FileSystemFileHandle and FileSystemDirectoryHandle, for files and directories respectively. > The handles represent a file or directory on the user's system. You can first gain access to them by showing the user a file or directory picker using methods such as window.showOpenFilePicker() and window.showDirectoryPicker(). Once these are called, the file picker presents itself and the user selects either a file or directory. Once this happens successfully, a handle is returned.