I got tired of typing more than one line to get a recursive list of pathlib.Path objects for a given directory.
Project description
pathCrawler
Small utility because I got tired of typing more than one line to get a recursive list of pathlib.Path objects for a directory.
Install using
py -m pip install pathCrawler
pathCrawler contains three functions: crawl, getDirectorySize, and formatSize.
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.
getDirectorySize takes a directory and returns the total size in bytes of the contents of the directory.
formatSize 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.
>>> formatSize(132458) '132.46 kb'
Project details
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
pathcrawler-0.0.3.tar.gz
(1.4 kB
view hashes)
Built Distribution
Close
Hashes for pathcrawler-0.0.3-py3-none-any.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 6d56f81a46c40be1b99c6e000dcfe1034e00fd998113b04bc1d80f6906231a71 |
|
MD5 | ebd55a6f176dfe3530ac0f3aea96e9cd |
|
BLAKE2b-256 | 5d3c0a56cf22f697f8795a560e77c50ec2dcc0c51f9240a9fd4f637af7156119 |