1------------------------------------------------------------------------------
2--                                                                          --
3--            FLORIST (FSU Implementation of POSIX.5) COMPONENTS            --
4--                                                                          --
5--                     P O S I X . F I L E _ S T A T U S                    --
6--                                                                          --
7--                                  S p e c                                 --
8--                                                                          --
9--                                                                          --
10--  This  file is a component  of FLORIST,  an implementation of the POSIX  --
11--  Ada  bindings  for  use with the GNAT Ada compiler and the FSU Gnu Ada  --
12--  Runtime Library (GNARL).                                                --
13--                                                                          --
14--  This package specification contains some text extracted from  IEEE STD  --
15--  1003.5: 1990, Information Technology -- POSIX Ada Language  Interfaces  --
16--  Part 1: Binding  for  System Application Program Interface, as amended  --
17--  by IEEE STD 1003.5b: 1996, Amendment 1: Realtime Extensions, copyright  --
18--  1996 by the Institute of Electrical and Electronics Engineers, Inc.     --
19--                                                                          --
20--  The package specifications in the IEEE standards cited above represent  --
21--  only a  portion  of  the  documents  and  are  not to be interpreteted  --
22--  outside the context  of  the documents.  The standards must be used in  --
23--  conjunction  with  the  package   specifications  in  order  to  claim  --
24--  conformance.   The IEEE takes no responsibility for and will assume no  --
25--  liability for damages resulting from the reader's misinterpretation of  --
26--  said  information resulting from its out-of-context nature.   To order  --
27--  copies of the IEEE standards,  please contact the  IEEE Service Center  --
28--  at 445 Hoes Lane, PO Box 1331, Piscataway, NJ 08855-1331; via phone at  --
29--  1-800-678-IEEE, 908-981-1393; or via fax at 908-981-9667.               --
30--                                                                          --
31--  These  package  specifications are  distributed in  the hope that they  --
32--  will  be useful, but  WITHOUT  ANY  WARRANTY; without even the implied  --
33--  warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.        --
34--                                                                          --
35------------------------------------------------------------------------------
36
37with POSIX.C,
38     POSIX.Calendar,
39     POSIX.IO,
40     POSIX.Permissions,
41     POSIX.Process_Identification;
42package POSIX.File_Status is
43
44   type Status is private;
45
46   function Get_File_Status (Pathname : POSIX.Pathname)
47      return Status;
48   function Get_File_Status (File : POSIX.IO.File_Descriptor)
49      return Status;
50   --  Get_Link_Status is not in the IEEE standard
51   function Get_Link_Status (Pathname : POSIX.Pathname)
52      return Status;
53
54   type File_ID is private;
55   type Device_ID is private;
56   subtype Links is Natural range 0 .. POSIX.Link_Limit_Maxima'Last;
57   function Permission_Set_Of (File_Status : Status)
58      return POSIX.Permissions.Permission_Set;
59   function File_ID_Of (File_Status : Status)
60      return File_ID;
61   function Device_ID_Of (File_Status : Status)
62      return Device_ID;
63   function Link_Count_Of (File_Status : Status)
64      return Links;
65   function Owner_Of (File_Status : Status)
66      return POSIX.Process_Identification.User_ID;
67   function Group_Of (File_Status : Status)
68      return POSIX.Process_Identification.Group_ID;
69   function Size_Of (File_Status : Status)
70      return POSIX.IO_Count;
71   function Last_Access_Time_Of (File_Status : Status)
72      return POSIX.Calendar.POSIX_Time;
73   function Last_Modification_Time_Of (File_Status : Status)
74      return POSIX.Calendar.POSIX_Time;
75   function Last_Status_Change_Time_Of (File_Status : Status)
76      return POSIX.Calendar.POSIX_Time;
77   function Is_Block_Special_File (File_Status : Status)
78      return Boolean;
79   function Is_Character_Special_File (File_Status : Status)
80      return Boolean;
81   function Is_Directory (File_Status : Status)
82      return Boolean;
83   function Is_FIFO (File_Status : Status)
84      return Boolean;
85   --  Is_Symbolic_Link is not in the IEEE standard
86   function Is_Symbolic_Link (File_Status : Status)
87      return Boolean;
88   function Is_Regular_File (File_Status : Status)
89      return Boolean;
90   --  Is_Socket is part of the POSIX.5c [D2]
91   function Is_Socket (File_Status : Status)
92      return Boolean;
93   function Is_Shared_Memory (File_Status : Status)
94     return Boolean;
95   function Is_Message_Queue (File_Status : Status)
96      return Boolean;
97   function Is_Semaphore (File_Status : Status)
98      return Boolean;
99
100private
101   type Status is new POSIX.C.struct_stat;
102   type File_ID is new POSIX.C.ino_t;
103   type Device_ID is new POSIX.C.dev_t;
104end POSIX.File_Status;
105