EasyAbp / AbpHelper.CLI

Providing code generation and more features to help you develop applications and modules with the ABP framework.
MIT License
283 stars 95 forks source link

SearchInDirectoryRecursive returns 1 file instead of multiple #223

Closed T5ive closed 1 year ago

T5ive commented 1 year ago

Issue: The code that provided searches for files in a specified directory and its subdirectories based on a given pattern. However, the code only returns the first matched file it encounters, rather than all files that match the pattern.

From code: Multiple files should be returned https://github.com/EasyAbp/AbpHelper.CLI/blob/e44b0caf8872ef2f780042e0831f96bc0694b531/src/AbpHelper.Core/Steps/Common/MultiFilesFinderStep.cs#L37

Logs:

[2023-05-12 22:38:28.403 +07:00 [DBG] MultiFileFinderStep Input [excludeDirectories]: 2023-05-12 22:38:28.404 +07:00 [DBG] MultiFileFinderStep Input [SearchFileName]: '*.json' 2023-05-12 22:38:28.404 +07:00 [DBG] MultiFileFinderStep Output [files]: Found files count: 1, stored in parameter: 'MultiFilesFinderResult']

logs20230512.txt

Step

  1. Create a WebApp with ABP-Framework
  2. Use AbpHelper to generate CRUD

OS: Windows10 22H2


The initial solution that I have worked with return multiple files instead of a single file in the directory search process by storing the results in a collection and return the collection at the end

blackWins commented 1 year ago

Is there any problem with generator localization files

T5ive commented 1 year ago

the problem is there only generate from first detected of .json (localize file)

btw a first file generated works fine