namirasoft-core
Advanced tools
Comparing version 1.3.5 to 1.3.6
export declare class FileOperation { | ||
static findUp(fileName: string): string[]; | ||
static foreachFolder(base: string, handler: (base: string, sub: string, full: string) => Promise<void>, folders?: boolean, files?: boolean): Promise<void>; | ||
static foreachFolder(base: string, handler: (base: string, sub: string, full: string, folder: boolean) => Promise<void>, folders?: boolean, files?: boolean): Promise<void>; | ||
} |
@@ -48,3 +48,3 @@ "use strict"; | ||
if (folders) | ||
yield handler(base, sub, folder); | ||
yield handler(base, sub, folder, true); | ||
yield recursive(base, s); | ||
@@ -54,3 +54,3 @@ } | ||
if (files) | ||
yield handler(base, sub, folder); | ||
yield handler(base, sub, folder, false); | ||
} | ||
@@ -57,0 +57,0 @@ } |
@@ -11,3 +11,3 @@ { | ||
"private": false, | ||
"version": "1.3.5", | ||
"version": "1.3.6", | ||
"main": "./dist/index.js", | ||
@@ -14,0 +14,0 @@ "types": "./dist/index.d.ts", |
@@ -30,3 +30,3 @@ let fs: any; | ||
} | ||
static async foreachFolder(base: string, handler: (base: string, sub: string, full: string) => Promise<void>, folders: boolean = true, files: boolean = true) | ||
static async foreachFolder(base: string, handler: (base: string, sub: string, full: string, folder: boolean) => Promise<void>, folders: boolean = true, files: boolean = true) | ||
{ | ||
@@ -43,3 +43,3 @@ async function recursive(base: string, sub: string) | ||
if (folders) | ||
await handler(base, sub, folder); | ||
await handler(base, sub, folder, true); | ||
await recursive(base, s); | ||
@@ -50,3 +50,3 @@ } | ||
if (files) | ||
await handler(base, sub, folder); | ||
await handler(base, sub, folder, false); | ||
} | ||
@@ -53,0 +53,0 @@ } |
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
299891