aboutsummaryrefslogtreecommitdiff
path: root/gcc/m2/gm2-libs/CFileSysOp.def
blob: 1be213596b773dded4fd22180c58783a7c8edb47 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
DEFINITION MODULE CFileSysOp ;

FROM SYSTEM IMPORT ADDRESS ;


(*
   Description: provides access to filesystem operations.
                The implementation module is written in C
                and the parameters behave as their C
                counterparts.
*)

TYPE
   AccessMode = SET OF AccessStatus ;
   AccessStatus = (F_OK, R_OK, W_OK, X_OK, A_FAIL) ;


PROCEDURE Unlink (filename: ADDRESS) : INTEGER ;


(*
   Access - test access to a path or file.  The behavior is
            the same as defined in access(2).  Except that
            on A_FAIL is only used during the return result
            indicating the underlying C access has returned
            -1 (and errno can be checked).
*)

PROCEDURE Access (pathname: ADDRESS; mode: AccessMode) : AccessMode ;


(* Return TRUE if the caller can see the existance of the file or
   directory on the filesystem.  *)

(*
   IsDir - return true if filename is a regular directory.
*)

PROCEDURE IsDir (dirname: ADDRESS) : BOOLEAN ;


(*
   IsFile - return true if filename is a regular file.
*)

PROCEDURE IsFile (filename: ADDRESS) : BOOLEAN ;


(*
   Exists - return true if pathname exists.
*)

PROCEDURE Exists (pathname: ADDRESS) : BOOLEAN ;


END CFileSysOp.