Namespace

Methods

Files

Class/Module Index [+]

Quicksearch

Guestfs

Public Class Methods

Guestfs::Guestfs.new() → Guestfs::Guestfs click to toggle source

Call guestfs_create[http://libguestfs.org/guestfs.3.html#guestfs_create] to create a new libguestfs handle. The handle is represented in Ruby as an instance of the Guestfs::Guestfs class.

static VALUE
ruby_guestfs_create (VALUE m)
{
  guestfs_h *g;

  g = guestfs_create ();
  if (!g)
    rb_raise (e_Error, "failed to create guestfs handle");

  /* Don't print error messages to stderr by default. */
  guestfs_set_error_handler (g, NULL, NULL);

  /* Wrap it, and make sure the close function is called when the
   * handle goes away.
   */
  return Data_Wrap_Struct (c_guestfs, NULL, ruby_guestfs_free, g);
}

[Validate]

Generated with the Darkfish Rdoc Generator 2.