@azure-tools/async-io
Advanced tools
Comparing version 3.0.187 to 3.0.189
@@ -26,3 +26,3 @@ /// <reference types="node" /> | ||
export declare function filePath(path: string | Buffer | Url | URL): string; | ||
export declare const exists: (path: string | Buffer) => Promise<boolean>; | ||
export declare const exists: typeof fs.exists.__promisify__; | ||
export declare const readdir: (path: string | Buffer) => Promise<Array<string>>; | ||
@@ -29,0 +29,0 @@ export declare const close: (fd: number) => Promise<void>; |
@@ -56,3 +56,3 @@ "use strict"; | ||
exports.filePath = filePath; | ||
exports.exists = path => new Promise((r, j) => fs.stat(filePath(path), (err, stats) => err ? r(false) : r(true))); | ||
exports.exists = tasks_1.promisify(fs.exists); | ||
exports.readdir = tasks_1.promisify(fs.readdir); | ||
@@ -110,5 +110,3 @@ exports.close = tasks_1.promisify(fs.close); | ||
try { | ||
if (await exports.exists(filePath)) { | ||
return !(await exports.lstat(filePath)).isDirectory(); | ||
} | ||
return await exports.exists(filePath) && !await isDirectory(filePath); | ||
} | ||
@@ -115,0 +113,0 @@ catch (e) { |
{ | ||
"name": "@azure-tools/async-io", | ||
"version": "3.0.187", | ||
"version": "3.0.189", | ||
"patchOffset": 100, | ||
@@ -52,5 +52,5 @@ "description": "Asynchronous IO (for Azure Open Source Projects)", | ||
"dependencies": { | ||
"@azure-tools/tasks": "~3.0.188", | ||
"@azure-tools/tasks": "~3.0.189", | ||
"proper-lockfile": "~2.0.1" | ||
} | ||
} |
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
26106
371
Updated@azure-tools/tasks@~3.0.189