diff options
author | Richard Jones <rjones@redhat.com> | 2009-04-08 23:47:31 +0100 |
---|---|---|
committer | Richard Jones <rjones@redhat.com> | 2009-04-08 23:47:31 +0100 |
commit | c168ce1c91c8f4f615ec53e140970e0017ad750d (patch) | |
tree | a4d3c6b3cbf4a42f5fa9cf6fdb33ecda27a2bfd6 /guestfs-actions.pod | |
parent | f4299f7ea55c4bbc9302e102d2fc801829e75ef6 (diff) | |
download | libguestfs-c168ce1c91c8f4f615ec53e140970e0017ad750d.tar.gz libguestfs-c168ce1c91c8f4f615ec53e140970e0017ad750d.tar.xz libguestfs-c168ce1c91c8f4f615ec53e140970e0017ad750d.zip |
Generated code for new guestfs_read_lines API call.
Diffstat (limited to 'guestfs-actions.pod')
-rw-r--r-- | guestfs-actions.pod | 19 |
1 files changed, 19 insertions, 0 deletions
diff --git a/guestfs-actions.pod b/guestfs-actions.pod index b54917e5..fd720f9b 100644 --- a/guestfs-actions.pod +++ b/guestfs-actions.pod @@ -247,6 +247,25 @@ of the L<pvs(8)> command. The "full" version includes all fields. This function returns a C<struct guestfs_lvm_pv_list>. I<The caller must call C<guestfs_free_lvm_pv_list> after use.>. +=head2 guestfs_read_lines + + char **guestfs_read_lines (guestfs_h *handle, + const char *path); + +Return the contents of the file named C<path>. + +The file contents are returned as a list of lines. Trailing +C<LF> and C<CRLF> character sequences are I<not> returned. + +Note that this function cannot correctly handle binary files +(specifically, files containing C<\0> character which is treated +as end of line). For those you need to use the C<guestfs_read_file> +function which has a more complex interface. + +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_set_autosync int guestfs_set_autosync (guestfs_h *handle, |