Sophie

Sophie

distrib > Mandriva > 2010.1 > x86_64 > media > contrib-release > by-pkgid > d06a42d6393fd7c8e7da909da3d77a53 > files > 42

ocaml-fileutils-devel-0.4.0-1mdv2010.1.x86_64.rpm

<html><head>
<link rel="stylesheet" href="style.css" type="text/css">
<meta content="text/html; charset=iso-8859-1" http-equiv="Content-Type">
<link rel="Start" href="index.html">
<link title="Index of types" rel=Appendix href="index_types.html">
<link title="Index of exceptions" rel=Appendix href="index_exceptions.html">
<link title="Index of values" rel=Appendix href="index_values.html">
<link title="Index of modules" rel=Appendix href="index_modules.html">
<link title="Index of module types" rel=Appendix href="index_module_types.html">
<link title="FileUtil" rel="Chapter" href="FileUtil.html">
<link title="FileUtilStr" rel="Chapter" href="FileUtilStr.html">
<link title="FilePath" rel="Chapter" href="FilePath.html"><title>FileUtil.int_of_permission</title>
</head>
<body>
<code class="code"><span class="keyword">let</span>&nbsp;int_of_permission&nbsp;pr&nbsp;=<br>
&nbsp;&nbsp;<span class="keyword">let</span>&nbsp;permission_int&nbsp;=&nbsp;[&nbsp;<br>
&nbsp;&nbsp;&nbsp;&nbsp;(pr.user.sticky,&nbsp;&nbsp;0o4000);<br>
&nbsp;&nbsp;&nbsp;&nbsp;(pr.user.exec,&nbsp;&nbsp;&nbsp;&nbsp;0o0100);<br>
&nbsp;&nbsp;&nbsp;&nbsp;(pr.user.write,&nbsp;&nbsp;&nbsp;0o0200);<br>
&nbsp;&nbsp;&nbsp;&nbsp;(pr.user.read,&nbsp;&nbsp;&nbsp;&nbsp;0o0400);<br>
&nbsp;&nbsp;&nbsp;&nbsp;(pr.group.sticky,&nbsp;0o2000);<br>
&nbsp;&nbsp;&nbsp;&nbsp;(pr.group.exec,&nbsp;&nbsp;&nbsp;0o0010);<br>
&nbsp;&nbsp;&nbsp;&nbsp;(pr.group.write,&nbsp;&nbsp;0o0020);<br>
&nbsp;&nbsp;&nbsp;&nbsp;(pr.group.read,&nbsp;&nbsp;&nbsp;0o0040);<br>
&nbsp;&nbsp;&nbsp;&nbsp;(pr.other.sticky,&nbsp;0o1000);<br>
&nbsp;&nbsp;&nbsp;&nbsp;(pr.other.exec,&nbsp;&nbsp;&nbsp;0o0001);<br>
&nbsp;&nbsp;&nbsp;&nbsp;(pr.other.write,&nbsp;&nbsp;0o0002);<br>
&nbsp;&nbsp;&nbsp;&nbsp;(pr.other.read,&nbsp;&nbsp;&nbsp;0o0004)<br>
&nbsp;&nbsp;]<br>
&nbsp;&nbsp;<span class="keyword">in</span><br>
&nbsp;&nbsp;<span class="constructor">List</span>.fold_left&nbsp;(<span class="keyword">fun</span>&nbsp;full_perm&nbsp;(b,perm)&nbsp;<span class="keywordsign">-&gt;</span>&nbsp;<br>
&nbsp;&nbsp;&nbsp;&nbsp;<span class="keyword">if</span>&nbsp;b&nbsp;<span class="keyword">then</span>&nbsp;<br>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;perm&nbsp;<span class="keyword">lor</span>&nbsp;full_perm&nbsp;<br>
&nbsp;&nbsp;&nbsp;&nbsp;<span class="keyword">else</span>&nbsp;<br>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;full_perm)&nbsp;<br>
&nbsp;&nbsp;&nbsp;&nbsp;0o0000&nbsp;permission_int</code></body></html>