@kawalir/extension-node 0.5.0 → 0.6.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/CHANGELOG.md CHANGED
@@ -1 +1 @@
1
- New method Folder.delete
1
+ No change
@@ -1,4 +1,5 @@
1
1
  import { FileFunctions as FF } from "@kawalir/extension-node/Core/Functions";
2
+ import { Path, FileSystem } from "@kawalir/extension-node/External";
2
3
  import { TextFile } from "./TextFile";
3
4
 
4
5
  export class Folder {
@@ -6,6 +7,12 @@ export class Folder {
6
7
 
7
8
  public getFile = (name: string) => new TextFile(this.getPath(name));
8
9
 
10
+ public list = () =>
11
+ FileSystem.readdirSync(this.path, {
12
+ recursive: true,
13
+ encoding: "utf8",
14
+ }).map((p) => this.getPath(p));
15
+
9
16
  public getSubFolder = (relativePath: string) =>
10
17
  new Folder(this.getPath(relativePath));
11
18
 
@@ -13,6 +20,8 @@ export class Folder {
13
20
 
14
21
  public ensure = () => FF.Folder.ensure(this.path);
15
22
 
23
+ public testExistence = () => FF.Folder.testExistence(this.path);
24
+
16
25
  public delete = () => FF.Folder.delete(this.path);
17
26
 
18
27
  public get parent(): Folder {
package/package.json CHANGED
@@ -7,7 +7,7 @@
7
7
  "Node",
8
8
  "Node Extension"
9
9
  ],
10
- "version": "0.5.0",
10
+ "version": "0.6.1",
11
11
  "author": "Denis Mijatovic",
12
12
  "license": "MIT",
13
13
  "type": "commonjs",
@@ -30,7 +30,8 @@
30
30
  "minor": "npm run script Publish minor",
31
31
  "patch": "npm run script Publish patch",
32
32
  "script": "cd Scripts && npm start",
33
- "test": "cd Test && npm start"
33
+ "test": "cd Test && npm run once",
34
+ "watch-test": "cd Test && npm start"
34
35
  },
35
36
  "devDependencies": {
36
37
  "@types/node": "^25.3.0"