Version française
Home     About     Download     Resources     Contact us    
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 <skaller@users.sourceforge.net> 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
       buf.

       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.
                    <oiwa@yl.is.s.u-tokyo.ac.jp>, <yutaka@oiwa.jp>
PGP fingerprint = C9 8D 5C B8 86 ED D8 07  EA 59 34 D8 F4 65 53 61

-------------------
To unsubscribe, mail caml-list-request@inria.fr Archives: http://caml.inria.fr
Bug reports: http://caml.inria.fr/bin/caml-bugs FAQ: http://caml.inria.fr/FAQ/
Beginner's list: http://groups.yahoo.com/group/ocaml_beginners