Skip to content
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

Investigate file system API #21

Open
Sheraff opened this issue Nov 24, 2022 · 0 comments
Open

Investigate file system API #21

Sheraff opened this issue Nov 24, 2022 · 0 comments
Labels
robustness Not a bug, but not a good sign either

Comments

@Sheraff
Copy link
Owner

Sheraff commented Nov 24, 2022

Maybe media files (+ images) might be more reliably stored in the navigator's private file system https://web.dev/file-system-access/

const root = await navigator.storage.getDirectory();
// Create a new file handle.
const fileHandle = await root.getFileHandle('Untitled.txt', { create: true });
// Create a new directory handle.
const dirHandle = await root.getDirectoryHandle('New Folder', { create: true });
// Recursively remove a directory.
await root.removeEntry('Old Stuff', { recursive: true });

I haven't had any problems so far with the service worker cache. This is just in case.

@Sheraff Sheraff added the robustness Not a bug, but not a good sign either label Apr 23, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
robustness Not a bug, but not a good sign either
Projects
None yet
Development

No branches or pull requests

1 participant