From a3ff1a1b70d54e5e44fcca99909131743b90dd83 Mon Sep 17 00:00:00 2001 From: Hexagon Date: Sat, 30 Mar 2024 01:29:22 +0100 Subject: [PATCH] docs --- .github/workflows/test.yml | 4 ++-- src/stat/exists.ts | 7 +++++++ 2 files changed, 9 insertions(+), 2 deletions(-) diff --git a/.github/workflows/test.yml b/.github/workflows/test.yml index 1c0327a..128517e 100644 --- a/.github/workflows/test.yml +++ b/.github/workflows/test.yml @@ -13,9 +13,9 @@ jobs: bun_ci: uses: cross-org/workflows/.github/workflows/bun-ci.yml@main with: - jsr_dependencies: "@cross/test @std/assert @cross/runtime @std/path @cross/dir @cross/utils" + jsr_dependencies: "@cross/test @std/assert @cross/runtime @std/path @cross/dir @cross/utils @cross/env" node_ci: uses: cross-org/workflows/.github/workflows/node-ci.yml@main with: - jsr_dependencies: "@cross/test @std/assert @cross/runtime @std/path @cross/dir @cross/utils" + jsr_dependencies: "@cross/test @std/assert @cross/runtime @std/path @cross/dir @cross/utils @cross/env" test_target: "src/**/*.test.ts" \ No newline at end of file diff --git a/src/stat/exists.ts b/src/stat/exists.ts index 49c56ec..a676021 100644 --- a/src/stat/exists.ts +++ b/src/stat/exists.ts @@ -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 { try { await stat(path);