From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.1.3 (2006-06-01) on yquem.inria.fr X-Spam-Level: X-Spam-Status: No, score=0.0 required=5.0 tests=none autolearn=disabled version=3.1.3 X-Original-To: caml-list@yquem.inria.fr Delivered-To: caml-list@yquem.inria.fr Received: from discorde.inria.fr (discorde.inria.fr [192.93.2.38]) by yquem.inria.fr (Postfix) with ESMTP id 449F6BC69 for ; Fri, 20 Oct 2006 23:42:13 +0200 (CEST) Received: from out1.smtp.messagingengine.com (out1.smtp.messagingengine.com [66.111.4.25]) by discorde.inria.fr (8.13.6/8.13.6) with ESMTP id k9KLg8Uk006741 for ; Fri, 20 Oct 2006 23:42:12 +0200 Received: from db2.internal (db2.internal [10.202.2.12]) by frontend1.messagingengine.com (Postfix) with ESMTP id 0B966DB8C92; Fri, 20 Oct 2006 17:42:07 -0400 (EDT) Received: from heartbeat1.messagingengine.com ([10.202.2.160]) by db2.internal (MEProxy); Fri, 20 Oct 2006 17:42:10 -0400 X-Sasl-enc: rQkzCbq2CNhbqF88UYNcWCMWWHT46lxymQ1KBLu+98SX 1161380529 Received: from [172.16.112.115] (burnham.ljcrf.edu [192.231.106.2]) by mail.messagingengine.com (Postfix) with ESMTP id 683108FBC; Fri, 20 Oct 2006 17:42:07 -0400 (EDT) Date: Fri, 20 Oct 2006 14:41:34 -0700 (PDT) From: Martin Jambon X-X-Sender: martin@localhost To: Gerd Stolpmann Cc: caml-list@inria.fr Subject: Re: [Caml-list] Creating a directory with default permissions In-Reply-To: <1161372076.9721.31.camel@localhost.localdomain> Message-ID: References: <1161372076.9721.31.camel@localhost.localdomain> MIME-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII X-j-chkmail-Score: MSGID : 453942B0.000 on discorde : j-chkmail score : X : 0/20 1 X-Miltered: at discorde with ID 453942B0.000 by Joe's j-chkmail (http://j-chkmail.ensmp.fr)! X-Spam: no; 0.00; gerd:01 stolpmann:01 ocaml:01 umask:01 mkdir:01 val:01 mkdir:01 1977:98 unix:01 wrote:01 caml-list:01 jambon:01 jambon:01 defined:02 string:02 On Fri, 20 Oct 2006, Gerd Stolpmann wrote: > Am Freitag, den 20.10.2006, 11:43 -0700 schrieb Martin Jambon: > > Hello, > > > > Is there a way to write portable OCaml code which creates a directory > > with the default permissions as defined by umask? > > I don't see your problem. Unix.mkdir filename 0o777 does exactly what > you want. Oh yes, Thank you! I got misled by the documentation which says: val mkdir : string -> file_perm -> unit Create a directory with the given permissions. Martin -- Martin Jambon, PhD http://martin.jambon.free.fr