From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Delivered-To: caml-list@yquem.inria.fr Received: from nez-perce.inria.fr (nez-perce.inria.fr [192.93.2.78]) by yquem.inria.fr (Postfix) with ESMTP id 22F70BC88 for ; Wed, 2 Feb 2005 10:54:21 +0100 (CET) Received: from pauillac.inria.fr (pauillac.inria.fr [128.93.11.35]) by nez-perce.inria.fr (8.13.0/8.13.0) with ESMTP id j129sKag005561 for ; Wed, 2 Feb 2005 10:54:20 +0100 Received: from nez-perce.inria.fr (nez-perce.inria.fr [192.93.2.78]) by pauillac.inria.fr (8.7.6/8.7.3) with ESMTP id KAA10778 for ; Wed, 2 Feb 2005 10:54:20 +0100 (MET) Received: from yquem.inria.fr (yquem.inria.fr [128.93.8.37]) by nez-perce.inria.fr (8.13.0/8.13.0) with ESMTP id j129sKgw005556; Wed, 2 Feb 2005 10:54:20 +0100 Received: by yquem.inria.fr (Postfix, from userid 18180) id 15A22BC88; Wed, 2 Feb 2005 10:54:20 +0100 (CET) Date: Wed, 2 Feb 2005 10:54:20 +0100 From: Xavier Leroy To: Christophe TROESTLER Cc: "O'Caml Mailing List" Subject: Re: [Caml-list] [WISH] Unix.fstat and symlinks for win32 Message-ID: <20050202095420.GA8040@yquem.inria.fr> References: <20050201.110702.30392529.Christophe.Troestler@umh.ac.be> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20050201.110702.30392529.Christophe.Troestler@umh.ac.be> User-Agent: Mutt/1.3.28i X-Miltered: at nez-perce with ID 4200A34C.002 by Joe's j-chkmail (http://j-chkmail.ensmp.fr)! X-Miltered: at nez-perce with ID 4200A34C.000 by Joe's j-chkmail (http://j-chkmail.ensmp.fr)! X-Spam: no; 0.00; caml-list:01 fstat:01 symlinks:01 lstat:01 behaves:01 fstat:01 api:01 symbolic:01 imho:01 semantics:01 wrappers:01 stati:98 unix:01 unix:01 cygwin:01 X-Spam-Checker-Version: SpamAssassin 3.0.2 (2004-11-16) on yquem.inria.fr X-Spam-Status: No, score=0.0 required=5.0 tests=none autolearn=disabled version=3.0.2 X-Spam-Level: > Just a small note to tell that I think it would be nice to have > support for Unix.*stat on win32. Not all characteristics may make > sense but [file_kind], [st_size], [st_perm], [st_*time] do. I don't quite understand your question: Unix.stat is implemented under Windows (building on the _stati64() function provided by the MS C library) and sets the fields you mention to reasonable values. Still under Windows (native Windows, not Cygwin), Unix.lstat behaves like Unix.stat and Unix.fstat is not implemented. (I'm not even sure the latter is implementable at all with the Win32 API.) > Also, why not treat *.lnk as symbolic links under win32? IMHO it > would be more an asset than an hindrance. The Cygwin emulation layer does this, so the Cygwin version of Caml inherits that behavior. For the native Windows ports, I think this wouldn't fit the "spirit" of these ports, which is to remain relatively close to the semantics of the underlying OS (Windows) and provide Unix-like wrappers that are quite thin. Note that you could implement in Caml a library that sits on top of Unix and provides *.lnk-aware versions of Unix.openfile and other file-related calls. - Xavier Leroy