From 0d77038392952ceb36786ffb00d59153c6086b2d Mon Sep 17 00:00:00 2001 From: Marc Beninca Date: Tue, 17 Sep 2024 23:17:36 +0200 Subject: [PATCH] doc/create_image --- rwx/fs/__init__.py | 12 +++++++++--- 1 file changed, 9 insertions(+), 3 deletions(-) diff --git a/rwx/fs/__init__.py b/rwx/fs/__init__.py index 21ead50..b320ed2 100644 --- a/rwx/fs/__init__.py +++ b/rwx/fs/__init__.py @@ -9,12 +9,18 @@ from rwx import ps CHARSET = "UTF-8" -def create_image(file_path: str, size_bytes: int) -> None: - """Create a virtual device image file.""" +def create_image(file_path: Path, size_bytes: int) -> None: + """Create a virtual device image file. + + :param file_path: target image file + :type file_path: Path + :param size_bytes: virtual volume + :type size_bytes: int + """ ps.run( ("qemu-img", "create"), ("-f", "qcow2"), - (file_path, str(size_bytes)), + (str(file_path), str(size_bytes)), )