查找满足pattern的文件
(pattern, path)
| 16 | |
| 17 | |
| 18 | def find_files(pattern, path): |
| 19 | ''' |
| 20 | 查找满足pattern的文件 |
| 21 | ''' |
| 22 | result = [] |
| 23 | for root, dirs, files in os.walk(path): |
| 24 | for name in files: |
| 25 | if fnmatch.fnmatch(name, pattern): |
| 26 | result.append(os.path.join(root, name)) |
| 27 | for name in dirs: |
| 28 | if fnmatch.fnmatch(name, pattern): |
| 29 | result.append(os.path.join(root, name)) |
| 30 | return result |
| 31 | |
| 32 | |
| 33 | def get_commit_id(): |
no outgoing calls
no test coverage detected