Version française
Home     About     Download     Resources     Contact us    

This site is updated infrequently. For up-to-date information, please visit the new OCaml website at

Browse thread
[Caml-list] how to do a browser
[ Home ] [ Index: by date | by threads ]
[ Search: ]

[ Message by date: previous | next ] [ Message in thread: previous | next ] [ Thread: previous | next ]
Date: -- (:)
From: IKEDA Katsumi <ikeda@m...>
Subject: Re: [Caml-list] how to do a browser

From: "deerf hal" <>
Message-ID: <>
> i have look to ocamlbrowser sources but it is a little bit hard to 
> understand the code.
> i suppose that could be done with a listbox (with option brower) but i don't 
> know how to have the list of the files of a directory
> thank

To have it, use Unix.opendir and Unix.readdir.

For example,

let my_ls path =
  let dh = Unix.opendir path in
    while (true) do
      print_endline (Unix.readdir dh);
  with End_of_file -> ();;
# my_ls "/usr";;


IKEDA Katsumi  <>

To unsubscribe, mail Archives:
Bug reports: FAQ:
Beginner's list: