On this page
os.statvfs_result
Prev: os.stat_result | Up: os | Next: os.symlink
Rel: os.abort, os.access, os.chdir, os.chmod
Ref: docs.python.org โ os.statvfs_result
Tags: #public #python3 #stdlib #os
Import
import os
from os import statvfs_result
Signature & Overview
os.statvfs_result(iterable=(), /)
statvfs_result: Result from statvfs or fstatvfs.
Methods & Attributes
statvfs_result.count(self, value, /)โ Return number of occurrences of value.statvfs_result.index(self, value, start=0, stop=9223372036854775807, /)โ Return first index of value.
Usage
import os
if hasattr(os, "statvfs"):
res = os.statvfs(".")
assert isinstance(res, os.statvfs_result) and res.f_frsize > 0
Gotchas
- Unix-only: For portable disk space checks on Windows and Unix, prefer
shutil.disk_usage().
REPL Inspect
from os import statvfs_result
help(statvfs_result)
Linked from
Related notes
- tuts/python3/stdlib_module/os/stat_result Linked here; links to this page; shared tags: #os, #stdlib
- tuts/python3/stdlib_module/os/symlink Linked here; links to this page; shared tags: #os, #stdlib
- tuts/python3/stdlib_module/os Linked here; links to this page; shared tags: #stdlib
- tuts/python3/stdlib_module/os/abort Linked here; shared tags: #os, #stdlib
- tuts/python3/stdlib_module/os/access Linked here; shared tags: #os, #stdlib
- tuts/python3/stdlib_module/os/chdir Linked here; shared tags: #os, #stdlib
- tuts/python3/stdlib_module/os/chmod Linked here; shared tags: #os, #stdlib
- tuts/python3/stdlib_module/os/chown shared tags: #os, #stdlib
- tuts/python3/stdlib_module/os/close shared tags: #os, #stdlib
- tuts/python3/stdlib_module/os/cpu_count shared tags: #os, #stdlib