File System


The File System in a RaptorFX application can be managed by two ways; the first one is by using the File System Access API or via how Deno handles files.

// Using Deno API
await Deno.permissions.request({ name: "write" }).then(x => {
    if(x.state === "granted") Deno.writeTextFileSync("hello.txt", "Hello world!")
})

// Using File System Access API
const handle = await window.showSaveFilePicker()
const file = await handle.createWritable()
await file.write("Hello world!")
await file.close()