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] Reading directory Problem
[ Home ] [ Index: by date | by threads ]
[ Search: ]

[ Message by date: previous | next ] [ Message in thread: previous | next ] [ Thread: previous | next ]
Date: -- (:)
From: Chris Uzdavinis <chris@a...>
Subject: Re: [Caml-list] Reading directory Problem
"Le, To Trinh" <> writes:

> Hello,
> I have problem with determine directory or file type.  I wrote 
> DIR * dirp; struct dirent *pDirent; 
> while((pDirent=readdir(dirp)) != NULL)
> {
> if(pDirent->d_name[0] == '.'  continue;

This isn't a C newsgroup... but...

Ocaml has a function called "stat" (in the Unix module) that can give
you this information.  Who knows, maybe the stat function is available
in the POSIX spec too, with a C interface.  It seems that the POSIX
people copied the OCAML "Unix" library fairly closely.  <g>


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