Skip to main content
Deno 2 is finally here 🎉️
Learn more
Module

x/ayonli_jsext/dialog/file.ts>openDirectory

A JavaScript extension package for building strong and modern applications.
Latest
function openDirectory
import { openDirectory } from "https://deno.land/x/ayonli_jsext@v0.9.72/dialog/file.ts";

Opens the directory picker dialog and selects all its files to open.

Examples

Example 1

import { openDirectory } from "@ayonli/jsext/dialog";

const files = await openDirectory();

for (const file of files) {
    console.log(`File name: ${file.name}, path: ${file.webkitRelativePath}`);
}

Parameters

optional
options: Pick<FileDialogOptions, "title"> = [UNSUPPORTED]

Returns

Promise<File[]>