Skip to content

Instantly share code, notes, and snippets.

@MatLumin
Created July 4, 2024 20:46
Show Gist options
  • Save MatLumin/1552e3509ecf9c33d6795b4746ad760c to your computer and use it in GitHub Desktop.
Save MatLumin/1552e3509ecf9c33d6795b4746ad760c to your computer and use it in GitHub Desktop.
import os;
from typing import *;
def return_all_files_in_dir(dir_path="../")->List[str]:
walker = os.walk(dir_path);
output:List[str] = list();
for base_path, sub_dirs, sub_files in walker:
for sub_file in sub_files:
output.append(base_path + "/" + sub_file);
return output;
def main():
for i1 in return_all_files_in_dir("../"):
print(i1);
if __name__ == "__main__":
main()
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment