Skip to content

Commit

Permalink
docs
Browse files Browse the repository at this point in the history
  • Loading branch information
Hexagon committed Mar 30, 2024
1 parent 7074636 commit d908e8b
Showing 1 changed file with 7 additions and 0 deletions.
7 changes: 7 additions & 0 deletions src/stat/exists.ts
Original file line number Diff line number Diff line change
@@ -1,4 +1,11 @@
import { NotFoundError, stat } from "./mod.ts";

/**
* Checks if a file or directory exists at the specified path.
*
* @param path - The path to the file or directory.
* @returns True if the file or directory exists, otherwise false.
*/
export async function exists(path: string): Promise<boolean> {
try {
await stat(path);
Expand Down

0 comments on commit d908e8b

Please sign in to comment.