From bb07a7f858da5d07c57360e62c0ddfd24ce6be45 Mon Sep 17 00:00:00 2001 From: Richard Jones Date: Sat, 18 Apr 2009 22:33:15 +0100 Subject: Begin to add the upload and download commands. --- python/guestfs.py | 20 ++++++++++++++++++++ 1 file changed, 20 insertions(+) (limited to 'python/guestfs.py') diff --git a/python/guestfs.py b/python/guestfs.py index 943f80a7..fd495fdb 100644 --- a/python/guestfs.py +++ b/python/guestfs.py @@ -923,3 +923,23 @@ class GuestFS: """ return libguestfsmod.blockdev_rereadpt (self._o, device) + def upload (self, filename, remotefilename): + u"""Upload local file "filename" to "remotefilename" on the + filesystem. + + "filename" can also be a named pipe. + + See also "g.download". + """ + return libguestfsmod.upload (self._o, filename, remotefilename) + + def download (self, remotefilename, filename): + u"""Download file "remotefilename" and save it as "filename" + on the local machine. + + "filename" can also be a named pipe. + + See also "g.upload", "g.cat". + """ + return libguestfsmod.download (self._o, remotefilename, filename) + -- cgit