Skip to content

denoFileSystemModule

reference
1 min readUpdated

Kind: Constant

Source: src/adapter/deno/ssg.ts

Part of: Adapter

Definition

ts
FileSystemModule

Value

ts
{
  writeFile: async (path, data) => {
    const uint8Data =
      typeof data === 'string' ? new TextEncoder().encode(data) : new Uint8Array(data)
    await Deno.writeFile(path, uint8Data)
  },
  mkdir: async (path, options) => {
    return Deno.mkdir(path, { recursive: options?.recursive ?? false })
  },
}

Was this page helpful?

Download as PDF
denoFileSystemModule — Hono (narrator proof)