> From: owner-caml-list@pauillac.inria.fr [mailto:owner-caml- > list@pauillac.inria.fr] On Behalf Of Kontra, Gergely > Sent: Wednesday, August 21, 2002 8:25 PM > To: Maxence Guesdon > Cc: caml-list@inria.fr > Subject: Re: [Caml-list] finding files > > >Under Unix, use the following functions in the Unix module: > >Unix.opendir > >Unix.readdir > >Unix.stat (and the various fields of the returned value) > >Unix.closedir > > Nice. But how to do it under windows? > Using OCaml, you can do it in the same way. However, note that Unix.stat calls the _stat function provided by MS' C runtime (except for cygwin), and this implementation is _very_ limited (e.g. don't use st_ino : it's filled with a dummy value). If you need something more powerful, you will have to call Win32 APIs (GetFileInformationByHandle, GetFileSize, GetFileType, GetFileSecurity, ...). Some OCaml wrapper libraries for Win32 have been written. Hope this helps. Lionel Fourquaux