X-Git-Url: http://git.annexia.org/?p=libguestfs.git;a=blobdiff_plain;f=src%2Fgenerator.ml;h=e55b2b5a98f230384f150c11e83a2afc9e6805b6;hp=4bf4b0f409871934346f0c2c220d8b1cefcc5388;hb=306077ac965cde0a5605782921d33a72bb77c382;hpb=c9324c2025b2636cda243b71debcb6c6457c6001;ds=sidebyside diff --git a/src/generator.ml b/src/generator.ml index 4bf4b0f..e55b2b5 100755 --- a/src/generator.ml +++ b/src/generator.ml @@ -4188,6 +4188,18 @@ If the destination is a device, it must be as large or larger than the source file or device, otherwise the copy will fail. This command cannot do partial copies."); + ("filesize", (RInt64 "size", [Pathname "file"]), 218, [], + [InitBasicFS, Always, TestOutputInt ( + [["write_file"; "/file"; "hello, world"; "0"]; + ["filesize"; "/file"]], 12)], + "return the size of the file in bytes", + "\ +This command returns the size of C in bytes. + +To get other stats about a file, use C, C, +C, C etc. +To get the size of block devices, use C."); + ] let all_functions = non_daemon_functions @ daemon_functions