Version française
Home     About     Download     Resources     Contact us    
Browse thread
Creating a directory with default permissions
[ Home ] [ Index: by date | by threads ]
[ Search: ]

[ Message by date: previous | next ] [ Message in thread: previous | next ] [ Thread: previous | next ]
Date: -- (:)
From: Martin Jambon <martin1977@l...>
Subject: Re: [Caml-list] Creating a directory with default permissions
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