@@ -134,10 +134,10 @@ console.log(existentFolder.moveSync('path/to/move'))
134134// you can use getFilesByPattern method to get all files in the folder that match some pattern
135135// if recursive is true, will go inside subFolders too
136136const recursive = true
137- console .log (existentFolder .getFilesByPattern (' path/to/ **/*.ts' , recursive )) // [...files instance]
137+ console .log (existentFolder .getFilesByPattern (' **/*.ts' , recursive )) // [...files instance]
138138
139139// you can use getFoldersByPattern method to get all folders in the folder that match some pattern
140- console .log (existentFolder .getFoldersByPattern (' path/to/**/folder ' , recursive )) // [...folders instance]
140+ console .log (existentFolder .getFoldersByPattern (' ** ' , recursive )) // [...folders instance]
141141
142142// Folder uses readable streams in async methods to not block the event loop when handling huge files content
143143await existentFolder .load ()
@@ -156,22 +156,31 @@ await existentFolder.create()
156156``` ts
157157import { Path } from ' @secjs/utils'
158158
159- // pwd method will depend if you NODE_ENV environment variable is set.
160- // if you are using ci, testing or ts-development, pwd will return like this:
159+ // If NODE_TS is set to true, Path.pwd will always return without the build folder in the end of the path
161160Path .pwd () // '/home/your/computer/path/your-project-name'
162161
163- // if your NODE_ENV is not set, or you are using a diffrent value from ci, testing or ts-development,
164- // your pwd will return like this:
162+ // If NODE_TS is set to false, Path.pwd will always return with the build folder in the end of the path
165163Path .pwd () // '/home/your/computer/path/your-project-name/dist'
166164
167- // you can change your buildFolder name using forBuildFolder method
168- Path .forBuild (' build' ).pwd ()
165+ // You can use the method switchEnvVerify to turn off the NODE_TS environment variable verification
166+ Path .switchEnvVerify ()
167+
168+ // You can change the default build folder name using changeBuild method
169+ Path .changeBuild (' build' )
169170// '/home/your/computer/path/your-project-name/build'
170171
171- Path .pwd (' /src/' ) // '/home/your/computer/path/your-project-name/src'
172+ // you can change your build folder name using forBuild method too
173+ Path .forBuild (' buildd' ).pwd ()
174+ // '/home/your/computer/path/your-project-name/buildd'
175+
176+ Path .pwd (' /src/' ) // '/home/your/computer/path/your-project-name/build/src'
177+
178+ // You can use switchBuild to turn on or turn off the forceBuild parameter
179+ // forceBuild on
180+ Path .switchBuild ().public () // '/home/your/computer/path/your-project-name/build/public'
172181
173- Path . public () // '/home/your/computer/path/your-project-name/public'
174- Path .assets () // '/home/your/computer/path/your-project-name/public/assets'
182+ // forceBuild off
183+ Path .switchBuild (). assets () // '/home/your/computer/path/your-project-name/public/assets'
175184```
176185
177186---
0 commit comments