bp_text.file
This module implements the (abstract) file (super-)class.
Created: 2025-05-05 Author: Ruben Philipp <me@rubenphilipp.com>
$$ Last modified: 22:12:00 Mon May 5 2025 CEST
Classes
|
Abstract base class for a file. |
- class bp_text.file.File(file: str, data=None, verbose=False)[source]
Bases:
ABCAbstract base class for a file.
- Parameters:
file (string) – The filepath.
data (any) – The data of the file (optional). This is esp. useful when handling files containing text.
verbose (boolean) – Print extra information when True.
- property data
Getter/setter for the data.
- property file
Getter/setter for the file attribute.
- property file_checksum
Get the file checksum (sha256). Read-only.
- property verbose
Getter/setter for verbose (bool).