Skip to content

matt-manes/pathcrawler

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

2 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

pathcrawler

Just a file globber that also give you directory size.
Install using:

pip install pathcrawler

pathcrawler contains just three functions: crawl, get_directory_size, and format_size.
crawl takes a starting directory and returns a recursive list of pathlib.Path objects for all files in the starting directory and its sub folders.
get_directory_size takes a directory and returns the total size in bytes of the contents of the directory.
format_size takes a number (presumed to be bytes) and returns it as a string rounded to two decimal places with the appropriate unit suffix.
i.e.
>>>import pathcrawler
>>> pathcrawler.format_size(132458)
'132.46 kb'

About

No description, website, or topics provided.

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors

Languages