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

x/yxz/path/path.ts>Path.fromImportMeta

Deno Standard Extensions
Latest
method Path.fromImportMeta
import { Path } from "https://deno.land/x/yxz@0.32.0/path/path.ts";

Returns path relative to import.meta.

Note: As hosted script don't resolve to file system path, library should avoid this method.

Examples

Example 1

import { Path } from "https://deno.land/x/yxz/path/path.ts";

Path.fromImportMeta(import.meta)  // current file path
Path.fromImportMeta(import.meta, ".")  // current directory path

Parameters

importMeta: ImportMeta
optional
url = [UNSUPPORTED]