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] Unix.stat problem
[ Home ] [ Index: by date | by threads ]
[ Search: ]

[ Message by date: previous | next ] [ Message in thread: previous | next ] [ Thread: previous | next ]
Date: -- (:)
From: Yutaka OIWA <oiwa@y...>
Subject: Re: [Caml-list] Unix.stat problem
Hi John,

>> On 24 May 2004 15:56:05 +1000, skaller <> said:

skaller> Unix.stat (or my brain:) isn't working correctly on my system:
skaller> CVS Ocaml, Linux, Redhat 9:
skaller> gcc (GCC) 3.2.2 20030222 (Red Hat Linux 3.2.2-5)

From Linux man stat(2):

       stat stats the file pointed to by file_name and  fills  in

       lstat  is  identical to stat, except in the case of a sym-
       bolic link, where the link itself is stat-ed, not the file
       that it refers to.

So what you want is probably 

        val lstat : string -> stats
        (** Same as {!Unix.stat}, but in case the file is a symbolic link,
           return the informations for the link itself. *)
this one...

Yutaka Oiwa              Yonezawa Lab., Dept. of Computer Science,
      Graduate School of Information Sci. & Tech., Univ. of Tokyo.
                    <>, <>
PGP fingerprint = C9 8D 5C B8 86 ED D8 07  EA 59 34 D8 F4 65 53 61

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