summaryrefslogtreecommitdiff
path: root/std/fs/ensure_file.ts
diff options
context:
space:
mode:
Diffstat (limited to 'std/fs/ensure_file.ts')
-rw-r--r--std/fs/ensure_file.ts4
1 files changed, 2 insertions, 2 deletions
diff --git a/std/fs/ensure_file.ts b/std/fs/ensure_file.ts
index 77732164a..de6cab500 100644
--- a/std/fs/ensure_file.ts
+++ b/std/fs/ensure_file.ts
@@ -16,7 +16,7 @@ export async function ensureFile(filePath: string): Promise<void> {
try {
// if file exists
const stat = await lstat(filePath);
- if (!stat.isFile()) {
+ if (!stat.isFile) {
throw new Error(
`Ensure path exists, expected 'file', got '${getFileInfoType(stat)}'`
);
@@ -47,7 +47,7 @@ export function ensureFileSync(filePath: string): void {
try {
// if file exists
const stat = lstatSync(filePath);
- if (!stat.isFile()) {
+ if (!stat.isFile) {
throw new Error(
`Ensure path exists, expected 'file', got '${getFileInfoType(stat)}'`
);