Skip to content

Instantly share code, notes, and snippets.

@mdrakiburrahman
mdrakiburrahman / list_synapse_files_recursively.py
Created December 24, 2020 21:16
Recursively listing Data Lake files with `display` implemented
def deep_ls(path: str, max_depth=1):
"""
List all files and folders in specified path and
subfolders within maximum recursion depth.
"""
# List all files in path and apply sorting rules
li = mssparkutils.fs.ls(path)
# Return all files