466
|
1 <refentry id="access">
|
|
2 <refnamediv>
|
468
|
3 <refname>Access</refname>
|
|
4 <refpurpose>give file accessibility</refpurpose>
|
466
|
5 </refnamediv>
|
|
6
|
|
7 <refsynopsisdiv>
|
|
8 <funcsynopsis>
|
|
9 <funcprototype>
|
|
10 <funcdef><function>access</function></funcdef>
|
594
|
11 <paramdef>char *<parameter>fname</parameter></paramdef>
|
468
|
12 <paramdef>int <parameter>perm</parameter></paramdef>
|
466
|
13 </funcprototype>
|
|
14 </funcsynopsis>
|
|
15
|
|
16 </refsynopsisdiv>
|
|
17
|
|
18 <refsect1><title>Description</title>
|
|
19 <para>
|
594
|
20 Access returns 0 if the access modes specified in "perm" are
|
|
21 correct for the user to access "fname". -1 is returned if the
|
|
22 file cannot be accessed.
|
|
23 </para>
|
|
24 <para>
|
|
25 The value for "perm" may be any legal OS-9 mode as used for
|
|
26 "open()" or "creat()", it may be zero, which tests whether the
|
|
27 file exists, or the path to it may be searched.
|
|
28 </para>
|
|
29 </refsect1>
|
|
30 <refsect1><title>Caveats</title>
|
|
31 <para>
|
|
32 NOTE that the "perm" value is <emphasis>not</emphasis> compatible with other
|
|
33 systems.
|
466
|
34 </para>
|
|
35 </refsect1>
|
552
|
36 <refsect1><title>Diagnostics</title>
|
|
37 <para>
|
|
38 The appropiate error indication, if a value of -1 is returned,
|
|
39 may be found in "errno".
|
|
40 </para>
|
|
41 </refsect1>
|
|
42
|
466
|
43 </refentry>
|