caml-list - the Caml user's mailing list
 help / color / mirror / Atom feed
From: Xavier Leroy <Xavier.Leroy@inria.fr>
To: Christophe TROESTLER <Christophe.Troestler@umh.ac.be>
Cc: "O'Caml Mailing List" <caml-list@inria.fr>
Subject: Re: [Caml-list] [WISH] Unix.fstat and symlinks for win32
Date: Wed, 2 Feb 2005 10:54:20 +0100	[thread overview]
Message-ID: <20050202095420.GA8040@yquem.inria.fr> (raw)
In-Reply-To: <20050201.110702.30392529.Christophe.Troestler@umh.ac.be>

> 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


  parent reply	other threads:[~2005-02-02  9:54 UTC|newest]

Thread overview: 8+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2005-02-01 10:07 Christophe TROESTLER
2005-02-01 11:39 ` [Caml-list] " Marcin 'Qrczak' Kowalczyk
2005-02-01 12:38   ` Christophe TROESTLER
2005-02-01 14:19 ` Igor Pechtchanski
2005-02-02  9:54 ` Xavier Leroy [this message]
2005-02-02 12:52   ` Christophe TROESTLER
2005-02-02 15:08     ` Christopher A. Watford
2005-02-02 22:08   ` Robert Roessler

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20050202095420.GA8040@yquem.inria.fr \
    --to=xavier.leroy@inria.fr \
    --cc=Christophe.Troestler@umh.ac.be \
    --cc=caml-list@inria.fr \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).