Skip to content

MandalorianBatman/FilePaths

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

8 Commits
 
 
 
 

Repository files navigation

FilePaths

Program to Merge and Represent File Paths in a tree structure.

This program is written to represent filepaths given by git when checking for changed files between 2 commits (git diff --name-only SHA1 SHA2)

Given a list of file paths as a string This program converts them in a nested dictionary where each key contains the children dictionaries of the folder

Consider Input as:

'alpha/beta/gamma/delta alpha/beta/sigma beta/phi/pi/rho'

The program returns:

{'alpha': {'beta': {'gamma': {'delta': {}}, 'sigma': {}}}, 'beta': {'phi': {'pi': {'rho': {}}}}}

and Prints:

alpha
    beta
        gamma
            delta

        sigma
        
beta
    phi
        pi
            rho

About

Program to Merge and Represent File Paths

Resources

Stars

0 stars

Watchers

1 watching

Forks

Releases

No releases published

Packages

 
 
 

Contributors

Languages