Generated code for drop-caches command.
[libguestfs.git] / java / com / redhat / et / libguestfs / GuestFS.java
index 5b81623..c29789c 100644 (file)
@@ -2414,4 +2414,102 @@ public class GuestFS {
   private native void _zero (long g, String device)
     throws LibGuestFSException;
 
+  /**
+   * install GRUB
+   *
+   * This command installs GRUB (the Grand Unified
+   * Bootloader) on "device", with the root directory being
+   * "root".
+   * 
+   * @throws LibGuestFSException
+   */
+  public void grub_install (String root, String device)
+    throws LibGuestFSException
+  {
+    if (g == 0)
+      throw new LibGuestFSException ("grub_install: handle is closed");
+    _grub_install (g, root, device);
+  }
+  private native void _grub_install (long g, String root, String device)
+    throws LibGuestFSException;
+
+  /**
+   * copy a file
+   *
+   * This copies a file from "src" to "dest" where "dest" is
+   * either a destination filename or destination directory.
+   * 
+   * @throws LibGuestFSException
+   */
+  public void cp (String src, String dest)
+    throws LibGuestFSException
+  {
+    if (g == 0)
+      throw new LibGuestFSException ("cp: handle is closed");
+    _cp (g, src, dest);
+  }
+  private native void _cp (long g, String src, String dest)
+    throws LibGuestFSException;
+
+  /**
+   * copy a file or directory recursively
+   *
+   * This copies a file or directory from "src" to "dest"
+   * recursively using the "cp -a" command.
+   * 
+   * @throws LibGuestFSException
+   */
+  public void cp_a (String src, String dest)
+    throws LibGuestFSException
+  {
+    if (g == 0)
+      throw new LibGuestFSException ("cp_a: handle is closed");
+    _cp_a (g, src, dest);
+  }
+  private native void _cp_a (long g, String src, String dest)
+    throws LibGuestFSException;
+
+  /**
+   * move a file
+   *
+   * This moves a file from "src" to "dest" where "dest" is
+   * either a destination filename or destination directory.
+   * 
+   * @throws LibGuestFSException
+   */
+  public void mv (String src, String dest)
+    throws LibGuestFSException
+  {
+    if (g == 0)
+      throw new LibGuestFSException ("mv: handle is closed");
+    _mv (g, src, dest);
+  }
+  private native void _mv (long g, String src, String dest)
+    throws LibGuestFSException;
+
+  /**
+   * drop kernel page cache, dentries and inodes
+   *
+   * 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 <http://linux-mm.org/Drop_Caches>
+   * 
+   * Setting "whattodrop" to 3 should drop everything.
+   * 
+   * This automatically calls sync(2) before the operation,
+   * so that the maximum guest memory is freed.
+   * 
+   * @throws LibGuestFSException
+   */
+  public void drop_caches (int whattodrop)
+    throws LibGuestFSException
+  {
+    if (g == 0)
+      throw new LibGuestFSException ("drop_caches: handle is closed");
+    _drop_caches (g, whattodrop);
+  }
+  private native void _drop_caches (long g, int whattodrop)
+    throws LibGuestFSException;
+
 }