diff options
author | Richard W.M. Jones <rjones@redhat.com> | 2009-07-01 20:56:58 +0100 |
---|---|---|
committer | Richard W.M. Jones <rjones@redhat.com> | 2009-07-02 10:11:55 +0100 |
commit | 5186251f8f681f2ebb028423bb49a748861fd11e (patch) | |
tree | b95ea92a8ed1b9443dc04aaf7cdacc8191291bc0 /ocaml/guestfs.ml | |
parent | f20854ec61eef1aea313920f0cf193a78c1a9219 (diff) | |
download | libguestfs-5186251f8f681f2ebb028423bb49a748861fd11e.tar.gz libguestfs-5186251f8f681f2ebb028423bb49a748861fd11e.tar.xz libguestfs-5186251f8f681f2ebb028423bb49a748861fd11e.zip |
Add 'readdir' call.
This adds a readdir call (mostly intended for programs). The
return value is a list of guestfs_dirent structures.
This adds the new types 'struct guestfs_dirent' and
'struct guestfs_dirent_list', along with all the code to
return these in the different language bindings.
Also includes additional tests for OCaml and Perl bindings
to test this.
Diffstat (limited to 'ocaml/guestfs.ml')
-rw-r--r-- | ocaml/guestfs.ml | 7 |
1 files changed, 7 insertions, 0 deletions
diff --git a/ocaml/guestfs.ml b/ocaml/guestfs.ml index 0bf458c4..0d3349f4 100644 --- a/ocaml/guestfs.ml +++ b/ocaml/guestfs.ml @@ -115,6 +115,12 @@ type statvfs = { namemax : int64; } +type dirent = { + ino : int64; + ftyp : char; + name : string; +} + external test0 : t -> string -> string option -> string array -> bool -> int -> string -> string -> unit = "ocaml_guestfs_test0_byte" "ocaml_guestfs_test0" external test0rint : t -> string -> int = "ocaml_guestfs_test0rint" external test0rinterr : t -> int = "ocaml_guestfs_test0rinterr" @@ -306,3 +312,4 @@ external mkfifo : t -> int -> string -> unit = "ocaml_guestfs_mkfifo" external mknod_b : t -> int -> int -> int -> string -> unit = "ocaml_guestfs_mknod_b" external mknod_c : t -> int -> int -> int -> string -> unit = "ocaml_guestfs_mknod_c" external umask : t -> int -> int = "ocaml_guestfs_umask" +external readdir : t -> string -> dirent array = "ocaml_guestfs_readdir" |