diff --git a/rwx/fs/__init__.py b/rwx/fs/__init__.py index ecaebf0..2a6af2c 100644 --- a/rwx/fs/__init__.py +++ b/rwx/fs/__init__.py @@ -3,13 +3,13 @@ import shutil from rwx import ps -CHARSET = 'UTF-8' +CHARSET = "UTF-8" def create_image(file_path: str, size_bytes: int): ps.run( - ('qemu-img', 'create'), - ('-f', 'qcow2'), + ("qemu-img", "create"), + ("-f", "qcow2"), (file_path, size_bytes), ) @@ -20,17 +20,17 @@ def empty_file(path: str): def get_mount_uuid(path: str): return ps.run_line( - ('findmnt',), - ('--noheadings',), - ('--output', 'UUID'), + ("findmnt",), + ("--noheadings",), + ("--output", "UUID"), (path,), ) def get_path_mount(path: str): return ps.run_line( - ('stat',), - ('--format', '%m'), + ("stat",), + ("--format", "%m"), (path,), ) @@ -44,7 +44,7 @@ def make_directory(path: str): def read_file(file_path: str): - with open(file_path, 'br') as file_object: + with open(file_path, "br") as file_object: return file_object.read() @@ -66,5 +66,5 @@ def wipe(path: str): def write(file_path: str, text: str, charset=CHARSET): - with open(file_path, 'bw') as file_object: + with open(file_path, "bw") as file_object: file_object.write(text.encode(charset))