X-Git-Url: http://git.annexia.org/?p=libguestfs.git;a=blobdiff_plain;f=java%2Fcom%2Fredhat%2Fet%2Flibguestfs%2FGuestFS.java;h=cdc0f0947ce2c3721ead7de127ebd8643413831b;hp=40754204643dd29220dc66a23df85def44a7cbd8;hb=ad8a256f54a6cb99f89bb444c8597a152a793dce;hpb=05c34c1c1479bb07b31cfbf912743a8cf014a636 diff --git a/java/com/redhat/et/libguestfs/GuestFS.java b/java/com/redhat/et/libguestfs/GuestFS.java index 4075420..cdc0f09 100644 --- a/java/com/redhat/et/libguestfs/GuestFS.java +++ b/java/com/redhat/et/libguestfs/GuestFS.java @@ -3435,4 +3435,30 @@ public HashMap test0rhashtableerr () private native String[] _sh_lines (long g, String command) throws LibGuestFSException; + /** + * expand a wildcard path + *

+ * This command searches for all the pathnames matching + * "pattern" 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 glob(3) function with + * flags "GLOB_MARK|GLOB_BRACE". See that manual page for + * more details. + *

+ * @throws LibGuestFSException + */ + public String[] glob_expand (String pattern) + throws LibGuestFSException + { + if (g == 0) + throw new LibGuestFSException ("glob_expand: handle is closed"); + return _glob_expand (g, pattern); + } + private native String[] _glob_expand (long g, String pattern) + throws LibGuestFSException; + }