From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Original-To: caml-list@sympa.inria.fr Delivered-To: caml-list@sympa.inria.fr Received: from mail3-relais-sop.national.inria.fr (mail3-relais-sop.national.inria.fr [192.134.164.104]) by sympa.inria.fr (Postfix) with ESMTPS id 1094F7EF5E for ; Mon, 25 Jul 2016 15:23:28 +0200 (CEST) IronPort-PHdr: 9a23:JCd58BBtwcYFclEja1SMUyQJP3N1i/DPJgcQr6AfoPdwSP7zp8bcNUDSrc9gkEXOFd2CrakV06yI6uu+ASQp2tWoiDg6aptCVhsI2409vjcLJ4q7M3D9N+PgdCcgHc5PBxdP9nC/NlVJSo6lPwWB6kO74TNaIBjjLw09fr2zQd+KyZrunL7qs7ToICxwzAKnZr1zKBjk5S7wjeIxxbVYF6Aq1xHSqWFJcekFjUlhJFaUggqurpzopM0r221qtvkg789NV7nhN+R9FOQATWduD2dgxMDtuQPCTkOl4XwZGjEWnxxEGQnGxA39RpDw9DP9sfM70y6fa57YV7cxDBir6aZmTCjCHCEVMz9xpG3ejM19iORRvR+ntRh+64POeoiJNeNjc+XWfYVJFiJ6Qs9NWnkZUcuHZIwVAr9EZL4Aog== Authentication-Results: mail3-smtp-sop.national.inria.fr; spf=None smtp.pra=daniel.buenzli@erratique.ch; spf=None smtp.mailfrom=daniel.buenzli@erratique.ch; spf=None smtp.helo=postmaster@smtp.webfaction.com Received-SPF: None (mail3-smtp-sop.national.inria.fr: no sender authenticity information available from domain of daniel.buenzli@erratique.ch) identity=pra; client-ip=74.55.86.74; receiver=mail3-smtp-sop.national.inria.fr; envelope-from="daniel.buenzli@erratique.ch"; x-sender="daniel.buenzli@erratique.ch"; x-conformance=sidf_compatible Received-SPF: None (mail3-smtp-sop.national.inria.fr: no sender authenticity information available from domain of daniel.buenzli@erratique.ch) identity=mailfrom; client-ip=74.55.86.74; receiver=mail3-smtp-sop.national.inria.fr; envelope-from="daniel.buenzli@erratique.ch"; x-sender="daniel.buenzli@erratique.ch"; x-conformance=sidf_compatible Received-SPF: None (mail3-smtp-sop.national.inria.fr: no sender authenticity information available from domain of postmaster@smtp.webfaction.com) identity=helo; client-ip=74.55.86.74; receiver=mail3-smtp-sop.national.inria.fr; envelope-from="daniel.buenzli@erratique.ch"; x-sender="postmaster@smtp.webfaction.com"; x-conformance=sidf_compatible X-IronPort-Anti-Spam-Filtered: true X-IronPort-Anti-Spam-Result: A0BEAgCUEZZXf0pWN0pevXWBfIYdAoF0EgEBAQEBAQEBEQEBCQsLCRcxgjIEARIBghMBBSNWEAsaAiYCAkcQBhuIKASmQY01AQEIAQEBASOBAYl2hECDASuCEh0BBJkojAWEbYdDDoVrkCElA4QhiXkBAQE X-IPAS-Result: A0BEAgCUEZZXf0pWN0pevXWBfIYdAoF0EgEBAQEBAQEBEQEBCQsLCRcxgjIEARIBghMBBSNWEAsaAiYCAkcQBhuIKASmQY01AQEIAQEBASOBAYl2hECDASuCEh0BBJkojAWEbYdDDoVrkCElA4QhiXkBAQE X-IronPort-AV: E=Sophos;i="5.28,419,1464645600"; d="scan'208";a="185875031" Received: from mail6.webfaction.com (HELO smtp.webfaction.com) ([74.55.86.74]) by mail3-smtp-sop.national.inria.fr with ESMTP/TLS/DHE-RSA-AES256-SHA; 25 Jul 2016 15:23:26 +0200 Received: from [192.168.5.63] (235-233.dsl.iskon.hr [89.164.235.233]) by smtp.webfaction.com (Postfix) with ESMTP id 4027821051FD; Mon, 25 Jul 2016 13:23:23 +0000 (UTC) Date: Mon, 25 Jul 2016 15:23:21 +0200 From: =?utf-8?Q?Daniel_B=C3=BCnzli?= To: Hendrik Boom Cc: "=?utf-8?Q?caml-list=40inria.fr?=" Message-ID: <5F652B2186AD4689BFA57530C257846A@erratique.ch> In-Reply-To: <20160725125559.GA3606@topoi.pooq.com> References: <20160725125559.GA3606@topoi.pooq.com> X-Mailer: sparrow 1.6.4 (build 1178) MIME-Version: 1.0 Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: quoted-printable Content-Disposition: inline Subject: Re: [Caml-list] stat of nonexistent file Le lundi, 25 juillet 2016 =C3=A0 14:55, Hendrik Boom a =C3=A9crit : > (a) What do they do? The general design philosophy of the Unix library is to simply forward the = call to the equivalent C function, turning errors in to a `Unix.Error` exce= ption. So the question is usually resolved by looking at the documentation = of the C function. In that particular case if the file doesn't exist you wi= ll get an exception with the NOENT error. =20=20 > (b) Should this be specified in the documentation? I think it would be good if the documentation of the Unix module linked to = the documentation of the C functions in the POSIX standard (you will notice= the ocamlunix book usually does this when functions are introduced). > (c) Are these suitable functions to determine if a file exists? Yes. Don't forget to retry the call on EINTR though. Best,=20=20 Daniel =20=20