from typing import IO


class MachineInterface:
    def initialize(self):
        """Initializes the machine"""
        pass

    def check_if_file_exists(self, file_path: str) -> bool:
        """
        Checks if a file exists.
        """
        pass

    def read_file(self, file_path: str) -> bytes:
        """
        Reads file and returns its contents

        Raises:
            FileNotFoundError: If file does not exist
            PermissionError: If file is not readable
        """
        pass

    def write_file(self, file_path: str, data: bytes):
        """
        Writes to a file

        Raises:
            FileNotFoundError: If the path does not exist
            PermissionError: If the file is not writeable
        """
        pass

    def delete(self, file_path: str):
        """
        Deletes a file or directory
        """
        pass

    def move(self, source_file: str, destination_file: str):
        """
        Moves a file or directory from source to destination
        """
        pass

    def mkdir(self, dir_path):
        """
        Creates a directory
        """
        pass

    def execute_shell_command(self, command, *args: str) -> tuple[str, str, int]:
        """
        Executes a shell command and returns stdout, stderr and the return code
        """
        pass

    def execute_shell_command_live(self, command, *args: str) ->  tuple[IO, IO, IO]:
        """
        Executes a shell command and returns stdout, stderr and the return code
        """
        pass

    def get_hostname(self) -> str:
        """
        Returns the hostname of the machine
        """
        pass

    def get_hostname_short(self) -> str:
        """
        Returns a short version of the hostname
        """
        pass