X-Git-Url: http://git.annexia.org/?p=libguestfs.git;a=blobdiff_plain;f=python%2Fguestfs.py;h=6c425bc2132bb961fe05ed7d5b903f81cdb0b0aa;hp=4a23cdbb02037788259fa031ec675b25ca7ae4db;hb=9222136ac9b2e404dba128b1ac74dacaa8bf1038;hpb=e118c14b9552de311cbc1734e03a3226b484c1e8 diff --git a/python/guestfs.py b/python/guestfs.py index 4a23cdb..6c425bc 100644 --- a/python/guestfs.py +++ b/python/guestfs.py @@ -1190,3 +1190,34 @@ class GuestFS: """ return libguestfsmod.grub_install (self._o, root, device) + def cp (self, src, dest): + u"""This copies a file from "src" to "dest" where "dest" is + either a destination filename or destination directory. + """ + return libguestfsmod.cp (self._o, src, dest) + + def cp_a (self, src, dest): + u"""This copies a file or directory from "src" to "dest" + recursively using the "cp -a" command. + """ + return libguestfsmod.cp_a (self._o, src, dest) + + def mv (self, src, dest): + u"""This moves a file from "src" to "dest" where "dest" is + either a destination filename or destination directory. + """ + return libguestfsmod.mv (self._o, src, dest) + + def drop_caches (self, whattodrop): + u"""This instructs the guest kernel to drop its page cache, + and/or dentries and inode caches. The parameter + "whattodrop" tells the kernel what precisely to drop, + see + + Setting "whattodrop" to 3 should drop everything. + + This automatically calls sync(2) before the operation, + so that the maximum guest memory is freed. + """ + return libguestfsmod.drop_caches (self._o, whattodrop) +