(self, host_path, guest_path)
Copies a file from host_path (pathlib.Path) to guest_path (pathlib.PurePath).
        Ensures `mkdir -p` before calling LXD file put.
Copies a file from host_path (pathlib.Path) to guest_path (pathlib.PurePath).
        Ensures `mkdir -p` before calling LXD file put.
Copies a file from host_path ( pathlib . Path ) to guest_path ( pathlib . PurePath ) . Ensures mkdir - p before calling LXD file put .
def copy_file(self, host_path, guest_path):
        """
        Copies a file from host_path (pathlib.Path) to guest_path (pathlib.PurePath).
        Ensures `mkdir -p` before calling LXD file put.
        """
        self.run(['mkdir', '-p', str(guest_path.parent)])
        with host_path.open('rb') as f:
            logger.debug('Copying host:{} to guest:{}'.format(host_path, guest_path))
            self.lxd_container.files.put(str(guest_path), f.read())
def copy_file ( self , host_path , guest_path ) : self . run ( [ 'mkdir' , '-p' , str ( guest_path . parent ) ] ) with host_path . open ( 'rb' ) as f : logger . debug ( 'Copying host:{} to guest:{}' . format ( host_path , guest_path ) ) self . lxd_container . files . put ( str ( guest_path ) , f . read ( ) )