X-Git-Url: http://git.annexia.org/?a=blobdiff_plain;f=src%2Fgenerator.ml;h=b716e0afecbe914a54982e2a96d5c3da26171a7c;hb=05c34c1c1479bb07b31cfbf912743a8cf014a636;hp=64a8ab92b42e944b2d632b0ee8652c37450f3124;hpb=57d2dfab18ad3d987d9273bb7c1f42e73e0bbcb2;p=libguestfs.git diff --git a/src/generator.ml b/src/generator.ml index 64a8ab9..b716e0a 100755 --- a/src/generator.ml +++ b/src/generator.ml @@ -2373,6 +2373,34 @@ into a list of lines. See also: C"); + ("glob_expand", (RStringList "paths", [String "pattern"]), 113, [], + [InitBasicFS, Always, TestOutputList ( + [["mkdir_p"; "/a/b/c"]; + ["touch"; "/a/b/c/d"]; + ["touch"; "/a/b/c/e"]; + ["glob_expand"; "/a/b/c/*"]], ["/a/b/c/d"; "/a/b/c/e"]); + InitBasicFS, Always, TestOutputList ( + [["mkdir_p"; "/a/b/c"]; + ["touch"; "/a/b/c/d"]; + ["touch"; "/a/b/c/e"]; + ["glob_expand"; "/a/*/c/*"]], ["/a/b/c/d"; "/a/b/c/e"]); + InitBasicFS, Always, TestOutputList ( + [["mkdir_p"; "/a/b/c"]; + ["touch"; "/a/b/c/d"]; + ["touch"; "/a/b/c/e"]; + ["glob_expand"; "/a/*/x/*"]], [])], + "expand a wildcard path", + "\ +This command searches for all the pathnames matching +C according to the wildcard expansion rules +used by the shell. + +If no paths match, then this returns an empty list +(note: not an error). + +It is just a wrapper around the C L function +with flags C. +See that manual page for more details."); ]