diff options
author | Richard Jones <rjones@redhat.com> | 2009-04-06 11:44:48 +0100 |
---|---|---|
committer | Richard Jones <rjones@redhat.com> | 2009-04-06 11:44:48 +0100 |
commit | 1cf85b1e60e85c4940869c6291d75ac44a5bd190 (patch) | |
tree | 1ee9a499264042801ffd73f4c999a48a5535973b /src | |
parent | bf17bf81fef275892d24458ce5f1e5290b426742 (diff) | |
download | libguestfs-1cf85b1e60e85c4940869c6291d75ac44a5bd190.tar.gz libguestfs-1cf85b1e60e85c4940869c6291d75ac44a5bd190.tar.xz libguestfs-1cf85b1e60e85c4940869c6291d75ac44a5bd190.zip |
Implementations of 'cat', 'ls', and some cleanups.
Diffstat (limited to 'src')
-rwxr-xr-x | src/generator.ml | 10 |
1 files changed, 8 insertions, 2 deletions
diff --git a/src/generator.ml b/src/generator.ml index 44cc06be..da35a0fb 100755 --- a/src/generator.ml +++ b/src/generator.ml @@ -51,7 +51,12 @@ let functions = [ ("cat", (RString "content", P1 (String "path")), 4, [ProtocolLimitWarning], "list the contents of a file", "\ -Return the contents of the file named C<path>."); +Return the contents of the file named C<path>. + +Note that this function cannot correctly handle binary files +(specifically, files containing C<\\0> character which is treated +as end of string). For those you need to use the C<guestfs_read> +function which has a more complex interface."); ("ll", (RString "listing", P1 (String "directory")), 5, [], "list the files in a directory (long format)", @@ -69,7 +74,8 @@ List the files in C<directory> (relative to the root directory, there is no cwd). The '.' and '..' entries are not returned, but hidden files are shown. -This command is mostly useful for interactive sessions."); +This command is mostly useful for interactive sessions. Programs +should probably use C<guestfs_readdir> instead."); ("mount", (Err, P2 (String "device", String "mountpoint")), 1, [], "mount a guest disk at a position in the filesystem", |