Skip to content

using FS and IDBFS #19041

Closed Answered by cedric56
cedric56 asked this question in Q&A
Discussion options

You must be logged in to vote

<EmccExtraLDFlags>-lidbfs.js</EmccExtraLDFlags>

must be added to csproj in order to have IDBFS active.

import { dotnetRuntime } from './main.js';

const fs = dotnetRuntime.Module.FS;
fs.mkdir('/_cache', { recursive: true });
fs.mount(fs.filesystems.IDBFS, { autoPersist: true }, "/_cache");
fs.syncfs(true, function (err) { });

Replies: 1 comment

Comment options

You must be logged in to vote
0 replies
Answer selected by cedric56
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
1 participant