Skip to main content

One post tagged with "Python"

Python tag description

View All Tags

Node.js vs Python

· 3 min read
Vikram
Software Architect

Overview

I recently worked on a small code snippet for reading a list of files from a folder. Each file has a unique ID and may reference another file within it.

The goal of the code is to find a file using its unique ID, search through all folders and subfolders to locate it, and then determine how many files are included within it. It's also possible that files included in the first file have links to other files.

There's no limit on the number of levels or files it can search through. Sometimes the same file ID may appear multiple times, so the code removes duplicates and presents the list as a JSON in hierarchical form. `