From f450ce75b754fb869b34433c0126f7bb592b141b Mon Sep 17 00:00:00 2001 From: "Richard W.M. Jones" Date: Mon, 29 Jun 2009 10:09:13 +0100 Subject: Generated code for 'wc_*' commands. --- java/com/redhat/et/libguestfs/GuestFS.java | 54 ++++++++++++++++++++++++++++++ 1 file changed, 54 insertions(+) (limited to 'java/com') diff --git a/java/com/redhat/et/libguestfs/GuestFS.java b/java/com/redhat/et/libguestfs/GuestFS.java index c664801d..64b0802b 100644 --- a/java/com/redhat/et/libguestfs/GuestFS.java +++ b/java/com/redhat/et/libguestfs/GuestFS.java @@ -3569,4 +3569,58 @@ public HashMap test0rhashtableerr () private native String _mkdtemp (long g, String template) throws LibGuestFSException; + /** + * count lines in a file + *

+ * This command counts the lines in a file, using the "wc + * -l" external command. + *

+ * @throws LibGuestFSException + */ + public int wc_l (String path) + throws LibGuestFSException + { + if (g == 0) + throw new LibGuestFSException ("wc_l: handle is closed"); + return _wc_l (g, path); + } + private native int _wc_l (long g, String path) + throws LibGuestFSException; + + /** + * count words in a file + *

+ * This command counts the words in a file, using the "wc + * -w" external command. + *

+ * @throws LibGuestFSException + */ + public int wc_w (String path) + throws LibGuestFSException + { + if (g == 0) + throw new LibGuestFSException ("wc_w: handle is closed"); + return _wc_w (g, path); + } + private native int _wc_w (long g, String path) + throws LibGuestFSException; + + /** + * count characters in a file + *

+ * This command counts the characters in a file, using the + * "wc -c" external command. + *

+ * @throws LibGuestFSException + */ + public int wc_c (String path) + throws LibGuestFSException + { + if (g == 0) + throw new LibGuestFSException ("wc_c: handle is closed"); + return _wc_c (g, path); + } + private native int _wc_c (long g, String path) + throws LibGuestFSException; + } -- cgit