summary refs log tree commit diff stats
path: root/classification/files.py
blob: 65efda6ff42c528966f73e8bade63dd99d6fa1e2 (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
import os

def list_files_recursive(path='.'):
    result = []
    for entry in os.listdir(path):
        full_path = os.path.join(path, entry)
        if os.path.isdir(full_path):
            result = result + list_files_recursive(full_path)
        else:
            result.append(full_path)
    return result

if __name__ == "__main__":
    directory_path = '../gitlab/issues_text'
    arr = list_files_recursive(directory_path)
    print(arr)