Generated code for stat/lstat/statvfs changes.
[libguestfs.git] / perl / lib / Sys / Guestfs.pm
index 9d050b4..09663bc 100644 (file)
@@ -271,6 +271,34 @@ Only numeric uid and gid are supported.  If you want to use
 names, you will need to locate and parse the password file
 yourself (Augeas support makes this relatively easy).
 
+=item $output = $h->command (\@arguments);
+
+This call runs a command from the guest filesystem.  The
+filesystem must be mounted, and must contain a compatible
+operating system (ie. something Linux, with the same
+or compatible processor architecture).
+
+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).
+
+The C<$PATH> environment variable will contain at least
+C</usr/bin> and C</bin>.  If you require a program from
+another location, you should provide the full path in the
+first parameter.
+
+Shared libraries and data files required by the program
+must be available on filesystems which are mounted in the
+correct places.  It is the caller's responsibility to ensure
+all filesystems that are needed are mounted at the right
+locations.
+
+=item @lines = $h->command_lines (\@arguments);
+
+This is the same as C<$h-E<gt>command>, but splits the
+result into a list of lines.
+
 =item $h->config ($qemuparam, $qemuvalue);
 
 This can be used to add arbitrary qemu command line parameters
@@ -374,6 +402,16 @@ hidden files are shown.
 This command is mostly useful for interactive sessions.  Programs
 should probably use C<$h-E<gt>readdir> instead.
 
+=item %statbuf = $h->lstat ($path);
+
+Returns file information for the given C<path>.
+
+This is the same as C<$h-E<gt>stat> except that if C<path>
+is a symbolic link, then the link is stat-ed, not the file it
+refers to.
+
+This is the same as the C<lstat(2)> system call.
+
 =item $h->lvcreate ($logvol, $volgroup, $mbytes);
 
 This creates an LVM volume group called C<logvol>
@@ -540,6 +578,20 @@ the string C<,> (comma).
 B<This command is dangerous.  Without careful use you
 can easily destroy all your data>.
 
+=item %statbuf = $h->stat ($path);
+
+Returns file information for the given C<path>.
+
+This is the same as the C<stat(2)> system call.
+
+=item %statbuf = $h->statvfs ($path);
+
+Returns file system statistics for any mounted file system.
+C<path> should be a file or directory in the mounted file system
+(typically it is the mount point itself, but it doesn't need to be).
+
+This is the same as the C<statvfs(2)> system call.
+
 =item $h->sync ();
 
 This syncs the disk, so that any writes are flushed through to the