Generated code for 'equal' command.
[libguestfs.git] / java / com / redhat / et / libguestfs / GuestFS.java
index 5b81623..0725317 100644 (file)
@@ -2414,4 +2414,168 @@ 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;
+
+  /**
+   * return kernel messages
+   *
+   * This returns the kernel messages ("dmesg" output) from
+   * the guest kernel. This is sometimes useful for extended
+   * debugging of problems.
+   * 
+   * Another way to get the same information is to enable
+   * verbose messages with "g.set_verbose" or by setting the
+   * environment variable "LIBGUESTFS_DEBUG=1" before running
+   * the program.
+   * 
+   * @throws LibGuestFSException
+   */
+  public String dmesg ()
+    throws LibGuestFSException
+  {
+    if (g == 0)
+      throw new LibGuestFSException ("dmesg: handle is closed");
+    return _dmesg (g);
+  }
+  private native String _dmesg (long g)
+    throws LibGuestFSException;
+
+  /**
+   * ping the guest daemon
+   *
+   * This is a test probe into the guestfs daemon running
+   * inside the qemu subprocess. Calling this function checks
+   * that the daemon responds to the ping message, without
+   * affecting the daemon or attached block device(s) in any
+   * other way.
+   * 
+   * @throws LibGuestFSException
+   */
+  public void ping_daemon ()
+    throws LibGuestFSException
+  {
+    if (g == 0)
+      throw new LibGuestFSException ("ping_daemon: handle is closed");
+    _ping_daemon (g);
+  }
+  private native void _ping_daemon (long g)
+    throws LibGuestFSException;
+
+  /**
+   * test if two files have equal contents
+   *
+   * This compares the two files "file1" and "file2" and
+   * returns true if their content is exactly equal, or false
+   * otherwise.
+   * 
+   * The external cmp(1) program is used for the comparison.
+   * 
+   * @throws LibGuestFSException
+   */
+  public boolean equal (String file1, String file2)
+    throws LibGuestFSException
+  {
+    if (g == 0)
+      throw new LibGuestFSException ("equal: handle is closed");
+    return _equal (g, file1, file2);
+  }
+  private native boolean _equal (long g, String file1, String file2)
+    throws LibGuestFSException;
+
 }