(path)
| 92 | format_type = [".cpp", ".c", ".h", ".cu", ".cuh", ".inl"] |
| 93 | |
| 94 | def getfiles(path): |
| 95 | rst = [] |
| 96 | for p in os.listdir(path): |
| 97 | p = os.path.join(path, p) |
| 98 | if os.path.isdir(p): |
| 99 | rst += getfiles(p) |
| 100 | elif ( |
| 101 | os.path.isfile(p) |
| 102 | and not os.path.islink(p) |
| 103 | and os.path.splitext(p)[1] in format_type |
| 104 | ): |
| 105 | rst.append(p) |
| 106 | return rst |
| 107 | |
| 108 | files = [] |
| 109 | for path in args.path: |