Fast File Count: Recursively count files and directories very quickly
Project description
Fast File Count in Python
This is a Python package to quickly count the number of files and directories in a given path. Optionally you can count recursively and include hidden files in the total.
This package is a wrapper around fast-file-count
by Christopher Schultz
. Credit for the initial version
belongs to Christopher Schultz, I wrote the Python wrapper, converted the
Windows code to use builtin functionality, and packaged it up. See the file
src/c_count.c
for the other contributors and see the commit history of
this package on GitHub for my exact changes.
Installation
Installation can be done easily with pip:
$ pip install ffcount
Usage
There is a command line application called ffcount
, which recursively
counts files and directories:
$ ffcount
See ffcount -h
for options.
The package can also be used as a Python library, using the ffcount
function. This function returns a tuple (number_of_files, number_of_dirs)
and it can be used as follows:
>>> from ffcount import ffcount
# count everything under the current path
>>> ffcount()
(521013, 43012)
# count without hidden files
>>> ffcount(hidden=False)
(234012, 12082)
# use a different path
>>> ffcount('/tmp')
(81, 10)
Note that ffcount
counts links as files, even if they point to a
directory. In some cases, this explains the discrepancy with other ways of
counting.
To obtain the full function documentation, simply run:
>>> import ffcount
>>> help(ffcount)
License
The original C code by Christopher Schultz was licensed under the Apache License 2.0. This package is therefore licensed under this license as well.
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distributions
Hashes for ffcount-0.2.0-cp39-cp39-win_amd64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | f13513a6a5cfca63c2a7886e4788eda8088325fe93622ca7740c8f851c4d144b |
|
MD5 | 2a5dfa01224fd8ecfd466a7cd0340fb1 |
|
BLAKE2b-256 | dc022520a34d9de7d622e710cd8306d97e116c7aa642153ecf9a67f870f76723 |
Hashes for ffcount-0.2.0-cp39-cp39-win32.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 7cf6ed8a69cc460c92dc10e24ca6b89c91d27a4b7103e19c62f6982c184a2e0d |
|
MD5 | 356b9b32b05c403c3217b95802900d55 |
|
BLAKE2b-256 | 727d7ef497ae7007c388e04cbc522f024e790f07ed11e493312bccfbfb1347f7 |
Hashes for ffcount-0.2.0-cp39-cp39-manylinux2010_x86_64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 5f96557d8f451e5a24ebe24366be43fb1a0ecc69ab2c3f648749a96299e9379b |
|
MD5 | d38262f0c23c13f10f629be57577c4bb |
|
BLAKE2b-256 | 10d5a281f4f1726846bcb18d31382d1536dc52e21b935610fcc92d0cda89c02b |
Hashes for ffcount-0.2.0-cp39-cp39-manylinux2010_i686.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | e2e609f14759eb051a063efc4908a9eb9f9d5a7300658b4bc0a32b73c7b14b04 |
|
MD5 | fe2100c540d85c7022402116482c1b60 |
|
BLAKE2b-256 | cb6f0a1d34116370b86dd4e84719ad6299e2abbcfbd6f096622ebae1460678e5 |
Hashes for ffcount-0.2.0-cp39-cp39-manylinux1_x86_64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 3c4cfa9bf1f2d69419c176c327336450b00e91234f18f7ce98c9e22aa2061ee3 |
|
MD5 | aa445f570083f7113e0e4af8f51aad87 |
|
BLAKE2b-256 | 80454ab7ed80831871d2b189851f788adc98971702518012281d6e7eebf64f12 |
Hashes for ffcount-0.2.0-cp39-cp39-manylinux1_i686.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | eac3977ae9f30c7553fb78928f04656655dee90ea55dc62f75294c3386b2191a |
|
MD5 | e8a7007ecb4ef9dff36f565d45ab86a6 |
|
BLAKE2b-256 | 926443e3d8153d1c16fbab0baeacf052d9149b9ffcea36e62698f8f27fbc54c7 |
Hashes for ffcount-0.2.0-cp39-cp39-macosx_10_9_x86_64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | e431eb55fe3177d7243ca1e1bf047595e4df05529a7f01ee2299f8c6e2cfddf1 |
|
MD5 | a8c8f3913fd9d4acca33164fd0371e95 |
|
BLAKE2b-256 | 52e38762376c89b23a576164f2dfac00a8ecc2da79d9d095b05fd732c297f73e |
Hashes for ffcount-0.2.0-cp38-cp38-win_amd64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 89bfc84cbf8d3ae7327bc126f2c698a21f661f11609c3060b93d69f4051aba1c |
|
MD5 | 34c5685b5ec02b6c5d1d5ac22ebf0520 |
|
BLAKE2b-256 | a2ab209afdfd536d726dfcb99faa79d9cc12664ff2498db088394e00b33ec623 |
Hashes for ffcount-0.2.0-cp38-cp38-win32.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 3229668156764046ea3881322c4323ccb99b19a382fc445d9d4f5231c84681b5 |
|
MD5 | 1c7930a02aac822f532e93ca49f75b6c |
|
BLAKE2b-256 | 539f67726a6090ad92ff0299f85f0bb0e63ee0277c1bd358ef2a73e25183c1c0 |
Hashes for ffcount-0.2.0-cp38-cp38-manylinux2010_x86_64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 47b19e00aea0a223280e602c8802fcb6e1a8a1a1b9e71508a5bb1b55587523cc |
|
MD5 | 412f1aecb5853e01a53e9c2b512a4c58 |
|
BLAKE2b-256 | f46db2b77e566c5035ae42e864c4f2931ee6e6951fc57fe9a414f0eb4858cd71 |
Hashes for ffcount-0.2.0-cp38-cp38-manylinux2010_i686.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | b2f3dfb965a0c8ae13810ebb5c8058ba270073c5d129c7c1a926216643d93fbb |
|
MD5 | 1f1fdb40fb1b24b4a2f9a5037bdc7a1a |
|
BLAKE2b-256 | 90bc8e1f86d0a090f5b6a64ff4b788a733ebf483251f31bf88476960475a7812 |
Hashes for ffcount-0.2.0-cp38-cp38-manylinux1_x86_64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 6ddd419f33d6bc12dfcb9d9ca22a9303151434969d60d043aee505a636a5d5ec |
|
MD5 | 81d5bb7febdc5b6b87d8dc8a357b16d3 |
|
BLAKE2b-256 | 1f466ccbf8fcfc911c60591db1c9359f252f0771e5ccbee077690f9a7d9644dc |
Hashes for ffcount-0.2.0-cp38-cp38-manylinux1_i686.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | c6999f8b6a666250926fdc3068e4217f3e3b9dcabc3ed8aa7bedcef22106605e |
|
MD5 | 34e22127d2db326b7b8b5326685d6dbb |
|
BLAKE2b-256 | 10f034d7360049ddf7a8f7277f5c7ebad97315dc9c9fd0d36662d24b517908de |
Hashes for ffcount-0.2.0-cp38-cp38-macosx_10_9_x86_64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 0011c23a397876bdf15f67e03346178bb198965f10d4c71f52e534584c10628a |
|
MD5 | 4b593e95efafd0bbe29ba3e729184c80 |
|
BLAKE2b-256 | 64299325016b83451d31c7b23709dec7ab218b76287e4d9e10d48f215f44da79 |
Hashes for ffcount-0.2.0-cp37-cp37m-win_amd64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | e3c67214ac6945beece9ee8cdb63b7baf001ea7a9cecfa493d6004b627c011b6 |
|
MD5 | ea2d9cd52832c1f7380ea1b486d0cb1b |
|
BLAKE2b-256 | 666be5826866df8c5c48ccab5bb345afa2596814fd42cf210e71994a183e8384 |
Hashes for ffcount-0.2.0-cp37-cp37m-win32.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 8e3604332336a17d3618b2346f96e2a172cf83937d987e8c00a52d1ce7b13ba6 |
|
MD5 | 1ea3ad27738e4866fa2b36d3ff782340 |
|
BLAKE2b-256 | 7c089421a554583c34b3516bc376598da4ad7e6f848985eb26d85336b4677472 |
Hashes for ffcount-0.2.0-cp37-cp37m-manylinux2010_x86_64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | fa88c9b5b92ca493cb3d0791a4973a9113599fa2ac6c1de73e8cc0681b7643a9 |
|
MD5 | 4ba6e65bc5e576967eb35dc0e58e8a0c |
|
BLAKE2b-256 | 15d06d08c34beb32a7af0cdf57062e4675f4d920f2cb4b2603acdc4a52caeceb |
Hashes for ffcount-0.2.0-cp37-cp37m-manylinux2010_i686.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | ada98694bc94e7d5c4a4e4afce6855dcc296b78e17c8b3c735e4f07d69f640d9 |
|
MD5 | 81c966dba61d4e1b16ecfbdd6bb2b2c1 |
|
BLAKE2b-256 | cc4685a96761c627f1d68a40f7d1c1e1df2fcec2f1041a644bbabda5bf0453a1 |
Hashes for ffcount-0.2.0-cp37-cp37m-manylinux1_x86_64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | ae3cda0dea79644ec9136810259e281efbaace38bb6c30ae2a7fab914576160d |
|
MD5 | ccf3af989017dc9a84847c70bf1ed5df |
|
BLAKE2b-256 | bf762242be6a83cb1e4228094c765b2f78ef1bda80498c1f2414598d2cd35a7f |
Hashes for ffcount-0.2.0-cp37-cp37m-manylinux1_i686.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 29fb3db1a0aa090b58f20c4bb8388dfe7f264463c4d55e28c83dc99ca846056d |
|
MD5 | 947e7ec0077d18377c5ecea7122922a4 |
|
BLAKE2b-256 | 664e06c6b332e0746eb11eecbe3bb59723a269f68122be09e86b6932a9aae371 |
Hashes for ffcount-0.2.0-cp37-cp37m-macosx_10_9_x86_64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 0014a72d599477399323256a15db349a4d4704cb24e90e8665a7398bd71de3d4 |
|
MD5 | 5c5e7d0b4e30df565438f62e4aedad15 |
|
BLAKE2b-256 | f5b7d9855f141e8e58eb43cb172caa8aea00d429e0ebdff1046b6da5e0517827 |
Hashes for ffcount-0.2.0-cp36-cp36m-win_amd64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | fb9b395f8b962b5463466f4b45f4dd604e5ba0f61e5af59bca8c411b7b272437 |
|
MD5 | dcff59f65c4e01ac6bc6c7bc35c2402f |
|
BLAKE2b-256 | 5c322efcca356d1f0d51488b9adbffd123830975e43100f73b2617e8fa86bc0e |
Hashes for ffcount-0.2.0-cp36-cp36m-win32.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | d156af1bcc09d4d9374bfc35feab9343a5b5defb1619ecc6b156ad6eb8e0d6a8 |
|
MD5 | c8d249e23ed112e2af18bd14fa17e594 |
|
BLAKE2b-256 | 9734ddf2b5b62a28763ac7d2e259a14ac8610fa6ac9ad2302a52a179b3a4bf91 |
Hashes for ffcount-0.2.0-cp36-cp36m-manylinux2010_x86_64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 7b0c42f1eb4e466a2c7002c7e8e36c11e76a74d926b115666768fdea0caf534c |
|
MD5 | 8edd024892e515cb9294c93a7762e6fa |
|
BLAKE2b-256 | f724fa884da3adfef51bcfbde749b3f417420c78b749ef541bb20ee125bc8534 |
Hashes for ffcount-0.2.0-cp36-cp36m-manylinux2010_i686.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 1de78cf1608b391b3f3101ca55c6bb67b26095650d2bb8dd6937edfeee5989ec |
|
MD5 | 3c67a7ebd900bc959385eae6914cb072 |
|
BLAKE2b-256 | 9abf00c18d8820c78e8545e941e1c7720b35d4d5328efb1c91962bde65027fa2 |
Hashes for ffcount-0.2.0-cp36-cp36m-manylinux1_x86_64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 367c5ee8dfde4970f868a74f38c415fab2ba47f0a7236a0fc4bb765ad483c25d |
|
MD5 | e097430cfd278194da3594659523bb49 |
|
BLAKE2b-256 | b83d360b88ec927dd97a39018d45343704ccf848e056a126d96dc0b705c950bd |
Hashes for ffcount-0.2.0-cp36-cp36m-manylinux1_i686.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 71e555dfd7041cd58a13a2214bda4b151b663770c2701aeb18c59d840e40bced |
|
MD5 | 2c0c0505f6dc21f6ce55660654984a8c |
|
BLAKE2b-256 | 0a68e427ffafdd15d4118212c3514d64c7d1bdb3766297bb68a0d16d237dfda1 |
Hashes for ffcount-0.2.0-cp36-cp36m-macosx_10_9_x86_64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | c0fb36191a3679f8febee8b3ef5c9739ba6fc25ff9221392b79d2861804036ac |
|
MD5 | f1780e8292f4b93f9aeb2ffd99f8484e |
|
BLAKE2b-256 | 4981a0f5becd950fd4a11893dee0a5f3e6bb06ffd494f1660bb18b5018d4cf4f |