File tree Expand file tree Collapse file tree 1 file changed +12
-1
lines changed Expand file tree Collapse file tree 1 file changed +12
-1
lines changed Original file line number Diff line number Diff line change @@ -266,7 +266,7 @@ func DeleteFiles(files ...string) (errs []error) {
266266 return
267267}
268268
269- // DirsPath method returns all directories path from given base path recursively.
269+ // DirsPath method returns all directories absolute path from given base path recursively.
270270func DirsPath (basePath string ) (pdirs []string , err error ) {
271271 err = Walk (basePath , func (srcPath string , info os.FileInfo , err error ) error {
272272 if info .IsDir () {
@@ -277,6 +277,17 @@ func DirsPath(basePath string) (pdirs []string, err error) {
277277 return
278278}
279279
280+ // FilesPath method returns all files absolute path from given base path recursively.
281+ func FilesPath (basePath string ) (files []string , err error ) {
282+ err = Walk (basePath , func (srcPath string , info os.FileInfo , err error ) error {
283+ if ! info .IsDir () {
284+ files = append (files , srcPath )
285+ }
286+ return nil
287+ })
288+ return
289+ }
290+
280291// StripExt method returns name of the file without extension.
281292// E.g.: index.html => index
282293func StripExt (name string ) string {
You can’t perform that action at this time.
0 commit comments