X-Git-Url: http://git.annexia.org/?p=libguestfs.git;a=blobdiff_plain;f=src%2Fgenerator.ml;h=c9da57e99823a6a27234f06a73553cb6c6d5ac03;hp=84ee90ff77d95149e734039bd3b70efa94b5795b;hb=42283403886da648bb239177369aa65c0a659255;hpb=a29a2e99ce120415941894da45087a360e6c65d3 diff --git a/src/generator.ml b/src/generator.ml index 84ee90f..c9da57e 100755 --- a/src/generator.ml +++ b/src/generator.ml @@ -950,6 +950,25 @@ Some internal mounts are not unmounted by this call."); This command removes all LVM logical volumes, volume groups and physical volumes."); + ("file", (RString "description", [String "path"]), 49, [], + [InitBasicFS, TestOutput ( + [["touch"; "/new"]; + ["file"; "/new"]], "empty"); + InitBasicFS, TestOutput ( + [["write_file"; "/new"; "some content\n"; "0"]; + ["file"; "/new"]], "ASCII text"); + InitBasicFS, TestLastFail ( + [["file"; "/nofile"]])], + "determine file type", + "\ +This call uses the standard L command to determine +the type or contents of the file. This also works on devices, +for example to find out whether a partition contains a filesystem. + +The exact command which runs is C. Note in +particular that the filename is not prepended to the output +(the C<-b> option)."); + ] let all_functions = non_daemon_functions @ daemon_functions