diff options
author | Richard Jones <rjones@trick.home.annexia.org> | 2009-05-19 12:05:43 +0100 |
---|---|---|
committer | Richard Jones <rjones@trick.home.annexia.org> | 2009-05-19 12:05:43 +0100 |
commit | 1fc41b39dac877ccec1284da8bb14baa4df368b8 (patch) | |
tree | 74d0693b6d97d796b75847ace4815109c17b3198 /guestfs-actions.pod | |
parent | d1df2f342489bbbba086cae2bb95971c8e404cad (diff) | |
download | libguestfs-1fc41b39dac877ccec1284da8bb14baa4df368b8.tar.gz libguestfs-1fc41b39dac877ccec1284da8bb14baa4df368b8.tar.xz libguestfs-1fc41b39dac877ccec1284da8bb14baa4df368b8.zip |
Generated code for 'find' command.
Diffstat (limited to 'guestfs-actions.pod')
-rw-r--r-- | guestfs-actions.pod | 34 |
1 files changed, 34 insertions, 0 deletions
diff --git a/guestfs-actions.pod b/guestfs-actions.pod index 6f33d80e..0d5efb4d 100644 --- a/guestfs-actions.pod +++ b/guestfs-actions.pod @@ -677,6 +677,40 @@ particular that the filename is not prepended to the output This function returns a string, or NULL on error. I<The caller must free the returned string after use>. +=head2 guestfs_find + + char **guestfs_find (guestfs_h *handle, + const char *directory); + +This command lists out all files and directories, recursively, +starting at C<directory>. It is essentially equivalent to +running the shell command C<find directory -print> but some +post-processing happens on the output, described below. + +This returns a list of strings I<without any prefix>. Thus +if the directory structure was: + + /tmp/a + /tmp/b + /tmp/c/d + +then the returned list from C<guestfs_find> C</tmp> would be +4 elements: + + a + b + c + c/d + +If C<directory> is not a directory, then this command returns +an error. + +The returned list is sorted. + +This function returns a NULL-terminated array of strings +(like L<environ(3)>), or NULL if there was an error. +I<The caller must free the strings and the array after use>. + =head2 guestfs_fsck int guestfs_fsck (guestfs_h *handle, |