X-Git-Url: http://git.annexia.org/?p=libguestfs.git;a=blobdiff_plain;f=src%2Fgenerator.ml;h=af19fdadfd58ca7e75e4c26fa09737a8aa678f82;hp=95a0985366b4d5120186bd922fc9bb5b8838da26;hb=f4299f7ea55c4bbc9302e102d2fc801829e75ef6;hpb=45f3a8981723079a5a020ab9438593531b1d8368 diff --git a/src/generator.ml b/src/generator.ml index 95a0985..af19fda 100755 --- a/src/generator.ml +++ b/src/generator.ml @@ -310,6 +310,19 @@ of the L command. The \"full\" version includes all fields."); "\ List all the logical volumes detected. This is the equivalent of the L command. The \"full\" version includes all fields."); + + ("read_lines", (RStringList "lines", P1 (String "path")), 15, [], + "read file as lines", + "\ +Return the contents of the file named C. + +The file contents are returned as a list of lines. Trailing +C and C character sequences are I 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 +function which has a more complex interface."); ] let all_functions = non_daemon_functions @ daemon_functions