diff --git a/rwx/fs/__init__.py b/rwx/fs/__init__.py index e769358..c91e0b8 100644 --- a/rwx/fs/__init__.py +++ b/rwx/fs/__init__.py @@ -1,3 +1,5 @@ +"""Operations involving FileSystems.""" + import os import shutil @@ -6,7 +8,8 @@ from rwx import ps CHARSET = "UTF-8" -def create_image(file_path: str, size_bytes: int): +def create_image(file_path: str, size_bytes: int) -> None: + """Create a virtual device image file.""" ps.run( ("qemu-img", "create"), ("-f", "qcow2"), @@ -14,11 +17,13 @@ def create_image(file_path: str, size_bytes: int): ) -def empty_file(path: str): +def empty_file(path: str) -> None: + """Empty the file at provided path.""" write(path, "") -def get_mount_uuid(path: str): +def get_mount_uuid(path: str) -> str: + """Return the UUID of provided mountpoint path.""" return ps.run_line( ("findmnt",), ("--noheadings",),