Skip to main content
Module

x/document_dir/mod.ts>default

Returns the path to the user's document directory.
function default
import { default } from "https://deno.land/x/document_dir@v0.1.0/mod.ts";

Returns the path to the user's document directory.

The returned value depends on the operating system and is either a string, containing a value from the following table, or null.

Platform Value Example
Linux XDG_DOCUMENTS_DIR /home/justjavac/Documents
macOS $HOME/Documents /Users/justjavac/Documents
Windows {FOLDERID_Documents} C:\Users\justjavac\Documents

Returns

string | null