Generated code for the 'mkswap*' commands.
[libguestfs.git] / java / com / redhat / et / libguestfs / GuestFS.java
index c7fcc11..c5d4364 100644 (file)
@@ -81,6 +81,276 @@ public class GuestFS {
     close ();
   }
 
+public void test0 (String str, String optstr, String[] strlist, boolean b, int integer, String filein, String fileout)
+    throws LibGuestFSException
+  {
+    if (g == 0)
+      throw new LibGuestFSException ("test0: handle is closed");
+    _test0 (g, str, optstr, strlist, b, integer, filein, fileout);
+  }
+  private native void _test0 (long g, String str, String optstr, String[] strlist, boolean b, int integer, String filein, String fileout)
+    throws LibGuestFSException;
+
+public int test0rint (String val)
+    throws LibGuestFSException
+  {
+    if (g == 0)
+      throw new LibGuestFSException ("test0rint: handle is closed");
+    return _test0rint (g, val);
+  }
+  private native int _test0rint (long g, String val)
+    throws LibGuestFSException;
+
+public int test0rinterr ()
+    throws LibGuestFSException
+  {
+    if (g == 0)
+      throw new LibGuestFSException ("test0rinterr: handle is closed");
+    return _test0rinterr (g);
+  }
+  private native int _test0rinterr (long g)
+    throws LibGuestFSException;
+
+public long test0rint64 (String val)
+    throws LibGuestFSException
+  {
+    if (g == 0)
+      throw new LibGuestFSException ("test0rint64: handle is closed");
+    return _test0rint64 (g, val);
+  }
+  private native long _test0rint64 (long g, String val)
+    throws LibGuestFSException;
+
+public long test0rint64err ()
+    throws LibGuestFSException
+  {
+    if (g == 0)
+      throw new LibGuestFSException ("test0rint64err: handle is closed");
+    return _test0rint64err (g);
+  }
+  private native long _test0rint64err (long g)
+    throws LibGuestFSException;
+
+public boolean test0rbool (String val)
+    throws LibGuestFSException
+  {
+    if (g == 0)
+      throw new LibGuestFSException ("test0rbool: handle is closed");
+    return _test0rbool (g, val);
+  }
+  private native boolean _test0rbool (long g, String val)
+    throws LibGuestFSException;
+
+public boolean test0rboolerr ()
+    throws LibGuestFSException
+  {
+    if (g == 0)
+      throw new LibGuestFSException ("test0rboolerr: handle is closed");
+    return _test0rboolerr (g);
+  }
+  private native boolean _test0rboolerr (long g)
+    throws LibGuestFSException;
+
+public String test0rconststring (String val)
+    throws LibGuestFSException
+  {
+    if (g == 0)
+      throw new LibGuestFSException ("test0rconststring: handle is closed");
+    return _test0rconststring (g, val);
+  }
+  private native String _test0rconststring (long g, String val)
+    throws LibGuestFSException;
+
+public String test0rconststringerr ()
+    throws LibGuestFSException
+  {
+    if (g == 0)
+      throw new LibGuestFSException ("test0rconststringerr: handle is closed");
+    return _test0rconststringerr (g);
+  }
+  private native String _test0rconststringerr (long g)
+    throws LibGuestFSException;
+
+public String test0rstring (String val)
+    throws LibGuestFSException
+  {
+    if (g == 0)
+      throw new LibGuestFSException ("test0rstring: handle is closed");
+    return _test0rstring (g, val);
+  }
+  private native String _test0rstring (long g, String val)
+    throws LibGuestFSException;
+
+public String test0rstringerr ()
+    throws LibGuestFSException
+  {
+    if (g == 0)
+      throw new LibGuestFSException ("test0rstringerr: handle is closed");
+    return _test0rstringerr (g);
+  }
+  private native String _test0rstringerr (long g)
+    throws LibGuestFSException;
+
+public String[] test0rstringlist (String val)
+    throws LibGuestFSException
+  {
+    if (g == 0)
+      throw new LibGuestFSException ("test0rstringlist: handle is closed");
+    return _test0rstringlist (g, val);
+  }
+  private native String[] _test0rstringlist (long g, String val)
+    throws LibGuestFSException;
+
+public String[] test0rstringlisterr ()
+    throws LibGuestFSException
+  {
+    if (g == 0)
+      throw new LibGuestFSException ("test0rstringlisterr: handle is closed");
+    return _test0rstringlisterr (g);
+  }
+  private native String[] _test0rstringlisterr (long g)
+    throws LibGuestFSException;
+
+public IntBool test0rintbool (String val)
+    throws LibGuestFSException
+  {
+    if (g == 0)
+      throw new LibGuestFSException ("test0rintbool: handle is closed");
+    return _test0rintbool (g, val);
+  }
+  private native IntBool _test0rintbool (long g, String val)
+    throws LibGuestFSException;
+
+public IntBool test0rintboolerr ()
+    throws LibGuestFSException
+  {
+    if (g == 0)
+      throw new LibGuestFSException ("test0rintboolerr: handle is closed");
+    return _test0rintboolerr (g);
+  }
+  private native IntBool _test0rintboolerr (long g)
+    throws LibGuestFSException;
+
+public PV[] test0rpvlist (String val)
+    throws LibGuestFSException
+  {
+    if (g == 0)
+      throw new LibGuestFSException ("test0rpvlist: handle is closed");
+    return _test0rpvlist (g, val);
+  }
+  private native PV[] _test0rpvlist (long g, String val)
+    throws LibGuestFSException;
+
+public PV[] test0rpvlisterr ()
+    throws LibGuestFSException
+  {
+    if (g == 0)
+      throw new LibGuestFSException ("test0rpvlisterr: handle is closed");
+    return _test0rpvlisterr (g);
+  }
+  private native PV[] _test0rpvlisterr (long g)
+    throws LibGuestFSException;
+
+public VG[] test0rvglist (String val)
+    throws LibGuestFSException
+  {
+    if (g == 0)
+      throw new LibGuestFSException ("test0rvglist: handle is closed");
+    return _test0rvglist (g, val);
+  }
+  private native VG[] _test0rvglist (long g, String val)
+    throws LibGuestFSException;
+
+public VG[] test0rvglisterr ()
+    throws LibGuestFSException
+  {
+    if (g == 0)
+      throw new LibGuestFSException ("test0rvglisterr: handle is closed");
+    return _test0rvglisterr (g);
+  }
+  private native VG[] _test0rvglisterr (long g)
+    throws LibGuestFSException;
+
+public LV[] test0rlvlist (String val)
+    throws LibGuestFSException
+  {
+    if (g == 0)
+      throw new LibGuestFSException ("test0rlvlist: handle is closed");
+    return _test0rlvlist (g, val);
+  }
+  private native LV[] _test0rlvlist (long g, String val)
+    throws LibGuestFSException;
+
+public LV[] test0rlvlisterr ()
+    throws LibGuestFSException
+  {
+    if (g == 0)
+      throw new LibGuestFSException ("test0rlvlisterr: handle is closed");
+    return _test0rlvlisterr (g);
+  }
+  private native LV[] _test0rlvlisterr (long g)
+    throws LibGuestFSException;
+
+public Stat test0rstat (String val)
+    throws LibGuestFSException
+  {
+    if (g == 0)
+      throw new LibGuestFSException ("test0rstat: handle is closed");
+    return _test0rstat (g, val);
+  }
+  private native Stat _test0rstat (long g, String val)
+    throws LibGuestFSException;
+
+public Stat test0rstaterr ()
+    throws LibGuestFSException
+  {
+    if (g == 0)
+      throw new LibGuestFSException ("test0rstaterr: handle is closed");
+    return _test0rstaterr (g);
+  }
+  private native Stat _test0rstaterr (long g)
+    throws LibGuestFSException;
+
+public StatVFS test0rstatvfs (String val)
+    throws LibGuestFSException
+  {
+    if (g == 0)
+      throw new LibGuestFSException ("test0rstatvfs: handle is closed");
+    return _test0rstatvfs (g, val);
+  }
+  private native StatVFS _test0rstatvfs (long g, String val)
+    throws LibGuestFSException;
+
+public StatVFS test0rstatvfserr ()
+    throws LibGuestFSException
+  {
+    if (g == 0)
+      throw new LibGuestFSException ("test0rstatvfserr: handle is closed");
+    return _test0rstatvfserr (g);
+  }
+  private native StatVFS _test0rstatvfserr (long g)
+    throws LibGuestFSException;
+
+public HashMap<String,String> test0rhashtable (String val)
+    throws LibGuestFSException
+  {
+    if (g == 0)
+      throw new LibGuestFSException ("test0rhashtable: handle is closed");
+    return _test0rhashtable (g, val);
+  }
+  private native HashMap<String,String> _test0rhashtable (long g, String val)
+    throws LibGuestFSException;
+
+public HashMap<String,String> test0rhashtableerr ()
+    throws LibGuestFSException
+  {
+    if (g == 0)
+      throw new LibGuestFSException ("test0rhashtableerr: handle is closed");
+    return _test0rhashtableerr (g);
+  }
+  private native HashMap<String,String> _test0rhashtableerr (long g)
+    throws LibGuestFSException;
+
   /**
    * launch the qemu subprocess
    * <p>
@@ -157,7 +427,13 @@ public class GuestFS {
    * to modify the image).
    * <p>
    * This is equivalent to the qemu parameter "-drive
-   * file=filename".
+   * file=filename,cache=off".
+   * <p>
+   * Note that this call checks for the existence of
+   * "filename". This stops you from specifying other types
+   * of drive which are supported by qemu such as "nbd:" and
+   * "http:" URLs. To specify those, use the general
+   * "g.config" call instead.
    * <p>
    * @throws LibGuestFSException
    */
@@ -180,6 +456,12 @@ public class GuestFS {
    * This is equivalent to the qemu parameter "-cdrom
    * filename".
    * <p>
+   * Note that this call checks for the existence of
+   * "filename". This stops you from specifying other types
+   * of drive which are supported by qemu such as "nbd:" and
+   * "http:" URLs. To specify those, use the general
+   * "g.config" call instead.
+   * <p>
    * @throws LibGuestFSException
    */
   public void add_cdrom (String filename)
@@ -193,6 +475,40 @@ public class GuestFS {
     throws LibGuestFSException;
 
   /**
+   * add a drive in snapshot mode (read-only)
+   * <p>
+   * This adds a drive in snapshot mode, making it
+   * effectively read-only.
+   * <p>
+   * Note that writes to the device are allowed, and will be
+   * seen for the duration of the guestfs handle, but they
+   * are written to a temporary file which is discarded as
+   * soon as the guestfs handle is closed. We don't currently
+   * have any method to enable changes to be committed,
+   * although qemu can support this.
+   * <p>
+   * This is equivalent to the qemu parameter "-drive
+   * file=filename,snapshot=on".
+   * <p>
+   * Note that this call checks for the existence of
+   * "filename". This stops you from specifying other types
+   * of drive which are supported by qemu such as "nbd:" and
+   * "http:" URLs. To specify those, use the general
+   * "g.config" call instead.
+   * <p>
+   * @throws LibGuestFSException
+   */
+  public void add_drive_ro (String filename)
+    throws LibGuestFSException
+  {
+    if (g == 0)
+      throw new LibGuestFSException ("add_drive_ro: handle is closed");
+    _add_drive_ro (g, filename);
+  }
+  private native void _add_drive_ro (long g, String filename)
+    throws LibGuestFSException;
+
+  /**
    * add qemu parameters
    * <p>
    * This can be used to add arbitrary qemu command line
@@ -1682,7 +1998,9 @@ public class GuestFS {
    * The single parameter is an argv-style list of arguments.
    * The first element is the name of the program to run.
    * Subsequent elements are parameters. The list must be
-   * non-empty (ie. must contain a program name).
+   * non-empty (ie. must contain a program name). Note that
+   * the command runs directly, and is *not* invoked via the
+   * shell (see "g.sh").
    * <p>
    * The return value is anything printed to *stdout* by the
    * command.
@@ -1724,6 +2042,8 @@ public class GuestFS {
    * This is the same as "g.command", but splits the result
    * into a list of lines.
    * <p>
+   * See also: "g.sh_lines"
+   * <p>
    * Because of the message protocol, there is a transfer
    * limit of somewhere between 2MB and 4MB. To transfer
    * large files you should use FTP.
@@ -2481,6 +2801,8 @@ public class GuestFS {
    * sufficient to remove any partition tables, filesystem
    * superblocks and so on.
    * <p>
+   * See also: "g.scrub_device".
+   * <p>
    * @throws LibGuestFSException
    */
   public void zero (String device)
@@ -2790,14 +3112,14 @@ public class GuestFS {
    * <p>
    * @throws LibGuestFSException
    */
-  public void sfdisk_N (String device, int n, int cyls, int heads, int sectors, String line)
+  public void sfdisk_N (String device, int partnum, int cyls, int heads, int sectors, String line)
     throws LibGuestFSException
   {
     if (g == 0)
       throw new LibGuestFSException ("sfdisk_N: handle is closed");
-    _sfdisk_N (g, device, n, cyls, heads, sectors, line);
+    _sfdisk_N (g, device, partnum, cyls, heads, sectors, line);
   }
-  private native void _sfdisk_N (long g, String device, int n, int cyls, int heads, int sectors, String line)
+  private native void _sfdisk_N (long g, String device, int partnum, int cyls, int heads, int sectors, String line)
     throws LibGuestFSException;
 
   /**
@@ -3021,4 +3343,551 @@ public class GuestFS {
   private native void _e2fsck_f (long g, String device)
     throws LibGuestFSException;
 
+  /**
+   * sleep for some seconds
+   * <p>
+   * Sleep for "secs" seconds.
+   * <p>
+   * @throws LibGuestFSException
+   */
+  public void sleep (int secs)
+    throws LibGuestFSException
+  {
+    if (g == 0)
+      throw new LibGuestFSException ("sleep: handle is closed");
+    _sleep (g, secs);
+  }
+  private native void _sleep (long g, int secs)
+    throws LibGuestFSException;
+
+  /**
+   * probe NTFS volume
+   * <p>
+   * This command runs the ntfs-3g.probe(8) command which
+   * probes an NTFS "device" for mountability. (Not all NTFS
+   * volumes can be mounted read-write, and some cannot be
+   * mounted at all).
+   * <p>
+   * "rw" is a boolean flag. Set it to true if you want to
+   * test if the volume can be mounted read-write. Set it to
+   * false if you want to test if the volume can be mounted
+   * read-only.
+   * <p>
+   * The return value is an integer which 0 if the operation
+   * would succeed, or some non-zero value documented in the
+   * ntfs-3g.probe(8) manual page.
+   * <p>
+   * @throws LibGuestFSException
+   */
+  public int ntfs_3g_probe (boolean rw, String device)
+    throws LibGuestFSException
+  {
+    if (g == 0)
+      throw new LibGuestFSException ("ntfs_3g_probe: handle is closed");
+    return _ntfs_3g_probe (g, rw, device);
+  }
+  private native int _ntfs_3g_probe (long g, boolean rw, String device)
+    throws LibGuestFSException;
+
+  /**
+   * run a command via the shell
+   * <p>
+   * This call runs a command from the guest filesystem via
+   * the guest's "/bin/sh".
+   * <p>
+   * This is like "g.command", but passes the command to:
+   * <p>
+   * /bin/sh -c "command"
+   * <p>
+   * Depending on the guest's shell, this usually results in
+   * wildcards being expanded, shell expressions being
+   * interpolated and so on.
+   * <p>
+   * All the provisos about "g.command" apply to this call.
+   * <p>
+   * @throws LibGuestFSException
+   */
+  public String sh (String command)
+    throws LibGuestFSException
+  {
+    if (g == 0)
+      throw new LibGuestFSException ("sh: handle is closed");
+    return _sh (g, command);
+  }
+  private native String _sh (long g, String command)
+    throws LibGuestFSException;
+
+  /**
+   * run a command via the shell returning lines
+   * <p>
+   * This is the same as "g.sh", but splits the result into a
+   * list of lines.
+   * <p>
+   * See also: "g.command_lines"
+   * <p>
+   * @throws LibGuestFSException
+   */
+  public String[] sh_lines (String command)
+    throws LibGuestFSException
+  {
+    if (g == 0)
+      throw new LibGuestFSException ("sh_lines: handle is closed");
+    return _sh_lines (g, command);
+  }
+  private native String[] _sh_lines (long g, String command)
+    throws LibGuestFSException;
+
+  /**
+   * expand a wildcard path
+   * <p>
+   * This command searches for all the pathnames matching
+   * "pattern" according to the wildcard expansion rules used
+   * by the shell.
+   * <p>
+   * If no paths match, then this returns an empty list
+   * (note: not an error).
+   * <p>
+   * It is just a wrapper around the C glob(3) function with
+   * flags "GLOB_MARK|GLOB_BRACE". See that manual page for
+   * more details.
+   * <p>
+   * @throws LibGuestFSException
+   */
+  public String[] glob_expand (String pattern)
+    throws LibGuestFSException
+  {
+    if (g == 0)
+      throw new LibGuestFSException ("glob_expand: handle is closed");
+    return _glob_expand (g, pattern);
+  }
+  private native String[] _glob_expand (long g, String pattern)
+    throws LibGuestFSException;
+
+  /**
+   * scrub (securely wipe) a device
+   * <p>
+   * This command writes patterns over "device" to make data
+   * retrieval more difficult.
+   * <p>
+   * It is an interface to the scrub(1) program. See that
+   * manual page for more details.
+   * <p>
+   * This command is dangerous. Without careful use you can
+   * easily destroy all your data.
+   * <p>
+   * @throws LibGuestFSException
+   */
+  public void scrub_device (String device)
+    throws LibGuestFSException
+  {
+    if (g == 0)
+      throw new LibGuestFSException ("scrub_device: handle is closed");
+    _scrub_device (g, device);
+  }
+  private native void _scrub_device (long g, String device)
+    throws LibGuestFSException;
+
+  /**
+   * scrub (securely wipe) a file
+   * <p>
+   * This command writes patterns over a file to make data
+   * retrieval more difficult.
+   * <p>
+   * The file is *removed* after scrubbing.
+   * <p>
+   * It is an interface to the scrub(1) program. See that
+   * manual page for more details.
+   * <p>
+   * @throws LibGuestFSException
+   */
+  public void scrub_file (String file)
+    throws LibGuestFSException
+  {
+    if (g == 0)
+      throw new LibGuestFSException ("scrub_file: handle is closed");
+    _scrub_file (g, file);
+  }
+  private native void _scrub_file (long g, String file)
+    throws LibGuestFSException;
+
+  /**
+   * scrub (securely wipe) free space
+   * <p>
+   * This command creates the directory "dir" and then fills
+   * it with files until the filesystem is full, and scrubs
+   * the files as for "g.scrub_file", and deletes them. The
+   * intention is to scrub any free space on the partition
+   * containing "dir".
+   * <p>
+   * It is an interface to the scrub(1) program. See that
+   * manual page for more details.
+   * <p>
+   * @throws LibGuestFSException
+   */
+  public void scrub_freespace (String dir)
+    throws LibGuestFSException
+  {
+    if (g == 0)
+      throw new LibGuestFSException ("scrub_freespace: handle is closed");
+    _scrub_freespace (g, dir);
+  }
+  private native void _scrub_freespace (long g, String dir)
+    throws LibGuestFSException;
+
+  /**
+   * create a temporary directory
+   * <p>
+   * This command creates a temporary directory. The
+   * "template" parameter should be a full pathname for the
+   * temporary directory name with the final six characters
+   * being "XXXXXX".
+   * <p>
+   * For example: "/tmp/myprogXXXXXX" or
+   * "/Temp/myprogXXXXXX", the second one being suitable for
+   * Windows filesystems.
+   * <p>
+   * The name of the temporary directory that was created is
+   * returned.
+   * <p>
+   * The temporary directory is created with mode 0700 and is
+   * owned by root.
+   * <p>
+   * The caller is responsible for deleting the temporary
+   * directory and its contents after use.
+   * <p>
+   * See also: mkdtemp(3)
+   * <p>
+   * @throws LibGuestFSException
+   */
+  public String mkdtemp (String template)
+    throws LibGuestFSException
+  {
+    if (g == 0)
+      throw new LibGuestFSException ("mkdtemp: handle is closed");
+    return _mkdtemp (g, template);
+  }
+  private native String _mkdtemp (long g, String template)
+    throws LibGuestFSException;
+
+  /**
+   * count lines in a file
+   * <p>
+   * This command counts the lines in a file, using the "wc
+   * -l" external command.
+   * <p>
+   * @throws LibGuestFSException
+   */
+  public int wc_l (String path)
+    throws LibGuestFSException
+  {
+    if (g == 0)
+      throw new LibGuestFSException ("wc_l: handle is closed");
+    return _wc_l (g, path);
+  }
+  private native int _wc_l (long g, String path)
+    throws LibGuestFSException;
+
+  /**
+   * count words in a file
+   * <p>
+   * This command counts the words in a file, using the "wc
+   * -w" external command.
+   * <p>
+   * @throws LibGuestFSException
+   */
+  public int wc_w (String path)
+    throws LibGuestFSException
+  {
+    if (g == 0)
+      throw new LibGuestFSException ("wc_w: handle is closed");
+    return _wc_w (g, path);
+  }
+  private native int _wc_w (long g, String path)
+    throws LibGuestFSException;
+
+  /**
+   * count characters in a file
+   * <p>
+   * This command counts the characters in a file, using the
+   * "wc -c" external command.
+   * <p>
+   * @throws LibGuestFSException
+   */
+  public int wc_c (String path)
+    throws LibGuestFSException
+  {
+    if (g == 0)
+      throw new LibGuestFSException ("wc_c: handle is closed");
+    return _wc_c (g, path);
+  }
+  private native int _wc_c (long g, String path)
+    throws LibGuestFSException;
+
+  /**
+   * return first 10 lines of a file
+   * <p>
+   * This command returns up to the first 10 lines of a file
+   * as a list of strings.
+   * <p>
+   * Because of the message protocol, there is a transfer
+   * limit of somewhere between 2MB and 4MB. To transfer
+   * large files you should use FTP.
+   * <p>
+   * @throws LibGuestFSException
+   */
+  public String[] head (String path)
+    throws LibGuestFSException
+  {
+    if (g == 0)
+      throw new LibGuestFSException ("head: handle is closed");
+    return _head (g, path);
+  }
+  private native String[] _head (long g, String path)
+    throws LibGuestFSException;
+
+  /**
+   * return first N lines of a file
+   * <p>
+   * If the parameter "nrlines" is a positive number, this
+   * returns the first "nrlines" lines of the file "path".
+   * <p>
+   * If the parameter "nrlines" is a negative number, this
+   * returns lines from the file "path", excluding the last
+   * "nrlines" lines.
+   * <p>
+   * If the parameter "nrlines" is zero, this returns an
+   * empty list.
+   * <p>
+   * Because of the message protocol, there is a transfer
+   * limit of somewhere between 2MB and 4MB. To transfer
+   * large files you should use FTP.
+   * <p>
+   * @throws LibGuestFSException
+   */
+  public String[] head_n (int nrlines, String path)
+    throws LibGuestFSException
+  {
+    if (g == 0)
+      throw new LibGuestFSException ("head_n: handle is closed");
+    return _head_n (g, nrlines, path);
+  }
+  private native String[] _head_n (long g, int nrlines, String path)
+    throws LibGuestFSException;
+
+  /**
+   * return last 10 lines of a file
+   * <p>
+   * This command returns up to the last 10 lines of a file
+   * as a list of strings.
+   * <p>
+   * Because of the message protocol, there is a transfer
+   * limit of somewhere between 2MB and 4MB. To transfer
+   * large files you should use FTP.
+   * <p>
+   * @throws LibGuestFSException
+   */
+  public String[] tail (String path)
+    throws LibGuestFSException
+  {
+    if (g == 0)
+      throw new LibGuestFSException ("tail: handle is closed");
+    return _tail (g, path);
+  }
+  private native String[] _tail (long g, String path)
+    throws LibGuestFSException;
+
+  /**
+   * return last N lines of a file
+   * <p>
+   * If the parameter "nrlines" is a positive number, this
+   * returns the last "nrlines" lines of the file "path".
+   * <p>
+   * If the parameter "nrlines" is a negative number, this
+   * returns lines from the file "path", starting with the
+   * "-nrlines"th line.
+   * <p>
+   * If the parameter "nrlines" is zero, this returns an
+   * empty list.
+   * <p>
+   * Because of the message protocol, there is a transfer
+   * limit of somewhere between 2MB and 4MB. To transfer
+   * large files you should use FTP.
+   * <p>
+   * @throws LibGuestFSException
+   */
+  public String[] tail_n (int nrlines, String path)
+    throws LibGuestFSException
+  {
+    if (g == 0)
+      throw new LibGuestFSException ("tail_n: handle is closed");
+    return _tail_n (g, nrlines, path);
+  }
+  private native String[] _tail_n (long g, int nrlines, String path)
+    throws LibGuestFSException;
+
+  /**
+   * report file system disk space usage
+   * <p>
+   * This command runs the "df" command to report disk space
+   * used.
+   * <p>
+   * This command is mostly useful for interactive sessions.
+   * It is *not* intended that you try to parse the output
+   * string. Use "statvfs" from programs.
+   * <p>
+   * @throws LibGuestFSException
+   */
+  public String df ()
+    throws LibGuestFSException
+  {
+    if (g == 0)
+      throw new LibGuestFSException ("df: handle is closed");
+    return _df (g);
+  }
+  private native String _df (long g)
+    throws LibGuestFSException;
+
+  /**
+   * report file system disk space usage (human readable)
+   * <p>
+   * This command runs the "df -h" command to report disk
+   * space used in human-readable format.
+   * <p>
+   * This command is mostly useful for interactive sessions.
+   * It is *not* intended that you try to parse the output
+   * string. Use "statvfs" from programs.
+   * <p>
+   * @throws LibGuestFSException
+   */
+  public String df_h ()
+    throws LibGuestFSException
+  {
+    if (g == 0)
+      throw new LibGuestFSException ("df_h: handle is closed");
+    return _df_h (g);
+  }
+  private native String _df_h (long g)
+    throws LibGuestFSException;
+
+  /**
+   * estimate file space usage
+   * <p>
+   * This command runs the "du -s" command to estimate file
+   * space usage for "path".
+   * <p>
+   * "path" can be a file or a directory. If "path" is a
+   * directory then the estimate includes the contents of the
+   * directory and all subdirectories (recursively).
+   * <p>
+   * The result is the estimated size in *kilobytes* (ie.
+   * units of 1024 bytes).
+   * <p>
+   * @throws LibGuestFSException
+   */
+  public long du (String path)
+    throws LibGuestFSException
+  {
+    if (g == 0)
+      throw new LibGuestFSException ("du: handle is closed");
+    return _du (g, path);
+  }
+  private native long _du (long g, String path)
+    throws LibGuestFSException;
+
+  /**
+   * list files in an initrd
+   * <p>
+   * This command lists out files contained in an initrd.
+   * <p>
+   * The files are listed without any initial "/" character.
+   * The files are listed in the order they appear (not
+   * necessarily alphabetical). Directory names are listed as
+   * separate items.
+   * <p>
+   * Old Linux kernels (2.4 and earlier) used a compressed
+   * ext2 filesystem as initrd. We *only* support the newer
+   * initramfs format (compressed cpio files).
+   * <p>
+   * @throws LibGuestFSException
+   */
+  public String[] initrd_list (String path)
+    throws LibGuestFSException
+  {
+    if (g == 0)
+      throw new LibGuestFSException ("initrd_list: handle is closed");
+    return _initrd_list (g, path);
+  }
+  private native String[] _initrd_list (long g, String path)
+    throws LibGuestFSException;
+
+  /**
+   * mount a file using the loop device
+   * <p>
+   * This command lets you mount "file" (a filesystem image
+   * in a file) on a mount point. It is entirely equivalent
+   * to the command "mount -o loop file mountpoint".
+   * <p>
+   * @throws LibGuestFSException
+   */
+  public void mount_loop (String file, String mountpoint)
+    throws LibGuestFSException
+  {
+    if (g == 0)
+      throw new LibGuestFSException ("mount_loop: handle is closed");
+    _mount_loop (g, file, mountpoint);
+  }
+  private native void _mount_loop (long g, String file, String mountpoint)
+    throws LibGuestFSException;
+
+  /**
+   * create a swap partition
+   * <p>
+   * Create a swap partition on "device".
+   * <p>
+   * @throws LibGuestFSException
+   */
+  public void mkswap (String device)
+    throws LibGuestFSException
+  {
+    if (g == 0)
+      throw new LibGuestFSException ("mkswap: handle is closed");
+    _mkswap (g, device);
+  }
+  private native void _mkswap (long g, String device)
+    throws LibGuestFSException;
+
+  /**
+   * create a swap partition with a label
+   * <p>
+   * Create a swap partition on "device" with label "label".
+   * <p>
+   * @throws LibGuestFSException
+   */
+  public void mkswap_L (String label, String device)
+    throws LibGuestFSException
+  {
+    if (g == 0)
+      throw new LibGuestFSException ("mkswap_L: handle is closed");
+    _mkswap_L (g, label, device);
+  }
+  private native void _mkswap_L (long g, String label, String device)
+    throws LibGuestFSException;
+
+  /**
+   * create a swap partition with an explicit UUID
+   * <p>
+   * Create a swap partition on "device" with UUID "uuid".
+   * <p>
+   * @throws LibGuestFSException
+   */
+  public void mkswap_U (String uuid, String device)
+    throws LibGuestFSException
+  {
+    if (g == 0)
+      throw new LibGuestFSException ("mkswap_U: handle is closed");
+    _mkswap_U (g, uuid, device);
+  }
+  private native void _mkswap_U (long g, String uuid, String device)
+    throws LibGuestFSException;
+
 }