Skip to content

Plain Text

stegobox.io.txt.read(filename)

Source code in stegobox/io/txt.py
1
2
3
def read(filename: str) -> str:
    with open(filename, "r") as f:
        return f.read()

stegobox.io.txt.write(filename, content)

Source code in stegobox/io/txt.py
def write(filename: str, content: str) -> None:
    with open(filename, "w") as f:
        f.write(content)

stegobox.io.txt.read_bytes(filename)

Source code in stegobox/io/txt.py
6
7
8
def read_bytes(filename: str) -> bytes:
    with open(filename, "rb") as f:
        return f.read()

stegobox.io.txt.write_bytes(filename, content)

Source code in stegobox/io/txt.py
def write_bytes(filename: str, content: bytes) -> None:
    with open(filename, "wb+") as f:
        f.write(content)