Skip to main content
The Deno 2 Release Candidate is here
Learn more
Module

x/fsrouter/deps.ts>fs.exists

A file system based router for Deno.
Go to Latest
function fs.exists
Deprecated
Deprecated

Checking the state of a file before using it causes a race condition. Perform the actual operation directly instead.

import { fs } from "https://deno.land/x/fsrouter@2.11.1/deps.ts";
const { exists } = fs;

Test whether or not the given path exists by checking with the file system

Parameters

filePath: string

Returns

Promise<boolean>