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
Install using
py -m pip install pathCrawlerGit must be installed and in your PATH.
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.2.tar.gz
(1.4 kB
view hashes)
Built Distribution
Close
Hashes for pathcrawler-0.0.2-py3-none-any.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | e17e68d61b97856b5c9383aa1776ba4f019d652d0cff4413dbe6b182ca5f6f04 |
|
MD5 | 4603bd086775ea21c27434ca3567e7af |
|
BLAKE2b-256 | ca1579bac8309b231c896b77353be85946b3234d8d8a231dfda85d6a313c00a3 |