The statcache module provides a simple optimization to os.stat(): remembering the values of previous invocations.
The statcache module defines the following functions:
The rest of the functions are used to clear the cache, or parts of it.
stat(path)
, if any.
stat(path)
for path starting
with prefix.
stat(path)
for path a file in
the directory prefix, including stat(prefix)
.
Example:
>>> import os, statcache >>> statcache.stat('.') (16893, 2049, 772, 18, 1000, 1000, 2048, 929609777, 929609777, 929609777) >>> os.stat('.') (16893, 2049, 772, 18, 1000, 1000, 2048, 929609777, 929609777, 929609777)
Follow Lee on X/Twitter - Father, Husband, Serial builder creating AI, crypto, games & web tools. We are friends :) AI Will Come To Life!
Check out: eBank.nz (Art Generator) |
Netwrck.com (AI Tools) |
Text-Generator.io (AI API) |
BitBank.nz (Crypto AI) |
ReadingTime (Kids Reading) |
RewordGame |
BigMultiplayerChess |
WebFiddle |
How.nz |
Helix AI Assistant