summaryrefslogtreecommitdiff
path: root/fs/exists.ts
diff options
context:
space:
mode:
Diffstat (limited to 'fs/exists.ts')
-rw-r--r--fs/exists.ts4
1 files changed, 2 insertions, 2 deletions
diff --git a/fs/exists.ts b/fs/exists.ts
index 41961a0f2..ce4b83a4c 100644
--- a/fs/exists.ts
+++ b/fs/exists.ts
@@ -2,7 +2,7 @@
/** Test whether or not the given path exists by checking with the file system */
export async function exists(filePath: string): Promise<boolean> {
- return Deno.stat(filePath)
+ return Deno.lstat(filePath)
.then(() => true)
.catch(() => false);
}
@@ -10,7 +10,7 @@ export async function exists(filePath: string): Promise<boolean> {
/** Test whether or not the given path exists by checking with the file system */
export function existsSync(filePath: string): boolean {
try {
- Deno.statSync(filePath);
+ Deno.lstatSync(filePath);
return true;
} catch {
return false;