Skip to main content
Using Deno in production at your company? Earn free Deno merch.
Give us feedback
Module

x/xdg/vendor/types/deno.d.ts>Deno.resources

Determine XDG Base Directory paths (OS/platform portable)
Go to Latest
function Deno.resources
import { Deno } from "https://deno.land/x/xdg@v10.3.0/vendor/types/deno.d.ts";
const { resources } = Deno;

Returns a map of open resource ids (rid) along with their string representations. This is an internal API and as such resource representation has any type; that means it can change any time.

console.log(Deno.resources());
// { 0: "stdin", 1: "stdout", 2: "stderr" }
Deno.openSync('../test.file');
console.log(Deno.resources());
// { 0: "stdin", 1: "stdout", 2: "stderr", 3: "fsFile" }

Returns

ResourceMap