[2d19ed6c] | 1 | @c |
---|
| 2 | @c COPYRIGHT (c) 1988-1998. |
---|
| 3 | @c On-Line Applications Research Corporation (OAR). |
---|
| 4 | @c All rights reserved. |
---|
| 5 | @c |
---|
| 6 | @c $Id$ |
---|
| 7 | @c |
---|
| 8 | |
---|
| 9 | @chapter Files and Directories |
---|
[0874502] | 10 | |
---|
[2d19ed6c] | 11 | @section Directories |
---|
[0874502] | 12 | |
---|
[2d19ed6c] | 13 | @subsection Format of Directory Entries |
---|
[0874502] | 14 | |
---|
[2d19ed6c] | 15 | @subsection Directory Operations |
---|
[0874502] | 16 | |
---|
| 17 | @example |
---|
[2a087f3] | 18 | struct dirent, Type, Unimplemented |
---|
| 19 | opendir(), Function, Untested Implementation, assumes directory services |
---|
| 20 | readdir(), Function, Untested Implementation, assumes directory services |
---|
| 21 | readdir_r(), Function, Untested Implementation, assumes directory services |
---|
| 22 | rewinddir(), Function, Untested Implementation, assumes directory services |
---|
| 23 | closedir(), Function, Untested Implementation, assumes directory services |
---|
[0874502] | 24 | @end example |
---|
| 25 | |
---|
[2d19ed6c] | 26 | @section Working Directory |
---|
[0874502] | 27 | |
---|
[2d19ed6c] | 28 | @subsection Change Current Working Directory |
---|
[0874502] | 29 | |
---|
| 30 | @example |
---|
[2a087f3] | 31 | chdir(), Function, Unimplemented |
---|
[0874502] | 32 | @end example |
---|
| 33 | |
---|
[2d19ed6c] | 34 | @subsection Get Working Directory Pathname |
---|
[0874502] | 35 | |
---|
| 36 | @example |
---|
[2a087f3] | 37 | getcwd(), Function, Untested Implementation, assumes directory services |
---|
[0874502] | 38 | @end example |
---|
| 39 | |
---|
[2d19ed6c] | 40 | @section General File Creation |
---|
[0874502] | 41 | |
---|
[2d19ed6c] | 42 | @subsection Open a File |
---|
[0874502] | 43 | |
---|
| 44 | @example |
---|
[2a087f3] | 45 | open(), Function, Implemented, requires rework for directory services |
---|
[7331714] | 46 | O_RDONLY, Constant, |
---|
| 47 | O_WRONLY, Constant, |
---|
| 48 | O_RDWR, Constant, |
---|
| 49 | O_APPEND, Constant, |
---|
| 50 | O_CREAT, Constant, |
---|
| 51 | O_DSYNC, Constant, |
---|
| 52 | O_EXCL, Constant, |
---|
| 53 | O_NOCTTY, Constant, |
---|
| 54 | O_NONBLOCK, Constant, |
---|
| 55 | O_RSYNC, Constant, |
---|
| 56 | O_SYNC, Constant, |
---|
| 57 | O_TRUNC, Constant, |
---|
[0874502] | 58 | @end example |
---|
| 59 | |
---|
[2d19ed6c] | 60 | @subsection Create a New File or Rewrite an Existing One |
---|
[0874502] | 61 | |
---|
| 62 | @example |
---|
[2a087f3] | 63 | creat(), Function, Untested Implementation |
---|
[0874502] | 64 | @end example |
---|
| 65 | |
---|
[2d19ed6c] | 66 | @subsection Set File Creation Mask |
---|
[0874502] | 67 | |
---|
| 68 | @example |
---|
[2a087f3] | 69 | umask(), Function, Unimplemented |
---|
[0874502] | 70 | @end example |
---|
| 71 | |
---|
[2d19ed6c] | 72 | @subsection Link to a File |
---|
[0874502] | 73 | |
---|
| 74 | @example |
---|
[2a087f3] | 75 | link(), Function, Dummy Implementation |
---|
[0874502] | 76 | @end example |
---|
| 77 | |
---|
[2d19ed6c] | 78 | @section Special File Creation |
---|
[0874502] | 79 | |
---|
[2d19ed6c] | 80 | @subsection Make a Directory |
---|
[0874502] | 81 | |
---|
| 82 | @example |
---|
[2a087f3] | 83 | mkdir(), Function, Unimplemented, assumes directory services |
---|
[0874502] | 84 | @end example |
---|
| 85 | |
---|
[2d19ed6c] | 86 | @subsection Make a FIFO Special File |
---|
[0874502] | 87 | |
---|
| 88 | @example |
---|
[2a087f3] | 89 | mkfifo(), Function, Unimplemented |
---|
[0874502] | 90 | @end example |
---|
| 91 | |
---|
[2d19ed6c] | 92 | @section File Removal |
---|
[0874502] | 93 | |
---|
[2d19ed6c] | 94 | @subsection Remove Directory Entries |
---|
[0874502] | 95 | |
---|
| 96 | @example |
---|
[2a087f3] | 97 | unlink(), Function, Dummy Implementation |
---|
[0874502] | 98 | @end example |
---|
| 99 | |
---|
[2d19ed6c] | 100 | @subsection Remove a Directory |
---|
[0874502] | 101 | |
---|
| 102 | @example |
---|
[2a087f3] | 103 | rmdir(), Function, Unimplemented |
---|
[0874502] | 104 | @end example |
---|
| 105 | |
---|
[2d19ed6c] | 106 | @subsection Rename a File |
---|
[0874502] | 107 | |
---|
| 108 | @example |
---|
[2a087f3] | 109 | rename(), Function, Untested Implementation, assumes link/unlink |
---|
[0874502] | 110 | @end example |
---|
| 111 | |
---|
[2d19ed6c] | 112 | @section File Characteristics |
---|
[0874502] | 113 | |
---|
[68feecfd] | 114 | @subsection File Characteristics Header and Data Structure |
---|
[0874502] | 115 | |
---|
[2a087f3] | 116 | @example |
---|
| 117 | struct stat, Type, Untested Implementation |
---|
| 118 | @end example |
---|
| 119 | |
---|
[7331714] | 120 | @subsubsection <sys/stat.h> File Types |
---|
| 121 | |
---|
| 122 | @example |
---|
| 123 | S_ISDIR(), Function, |
---|
| 124 | S_ISCHR(), Function, |
---|
| 125 | S_ISBLK(), Function, |
---|
| 126 | S_ISREG(), Function, |
---|
| 127 | S_ISFIFO(), Function, |
---|
| 128 | S_TYPEISMQ(), Function, |
---|
| 129 | S_TYPEISSEM(), Function, |
---|
| 130 | S_TYPEISSHM(), Function, |
---|
| 131 | @end example |
---|
| 132 | |
---|
| 133 | @subsubsection <sys/stat.h> File Modes |
---|
| 134 | |
---|
| 135 | @example |
---|
| 136 | S_IRWXU, Constant, |
---|
| 137 | S_IRUSR, Constant, |
---|
| 138 | S_IWUSR, Constant, |
---|
| 139 | S_IXUSR, Constant, |
---|
| 140 | S_IRWXG, Constant, |
---|
| 141 | S_IRGRP, Constant, |
---|
| 142 | S_IWGRP, Constant, |
---|
| 143 | S_IXGRP, Constant, |
---|
| 144 | S_IRWXO, Constant, |
---|
| 145 | S_IROTH, Constant, |
---|
| 146 | S_IWOTH, Constant, |
---|
| 147 | S_IXOTH, Constant, |
---|
| 148 | S_ISUID, Constant, |
---|
| 149 | S_ISGID, Constant, |
---|
| 150 | @end example |
---|
| 151 | |
---|
| 152 | @subsubsection <sys/stat.h> Time Entries |
---|
| 153 | |
---|
[2d19ed6c] | 154 | @subsection Get File Status |
---|
[0874502] | 155 | |
---|
| 156 | @example |
---|
[2a087f3] | 157 | stat(), Function, Partial Implementation |
---|
| 158 | fstat(), Function, Partial Implementation |
---|
[0874502] | 159 | @end example |
---|
| 160 | |
---|
[2d19ed6c] | 161 | @subsection Check File Accessibility |
---|
[0874502] | 162 | |
---|
| 163 | @example |
---|
[2a087f3] | 164 | access(), Function, Unimplemented |
---|
[0874502] | 165 | @end example |
---|
| 166 | |
---|
[2d19ed6c] | 167 | @subsection Change File Modes |
---|
[0874502] | 168 | |
---|
| 169 | @example |
---|
[2a087f3] | 170 | chmod(), Function, Unimplemented |
---|
| 171 | fchmod(), Function, Unimplemented |
---|
[0874502] | 172 | @end example |
---|
| 173 | |
---|
[2d19ed6c] | 174 | @subsection Change Owner and Group of a File |
---|
[0874502] | 175 | |
---|
| 176 | @example |
---|
[2a087f3] | 177 | chown(), Function, Unimplemented |
---|
[0874502] | 178 | @end example |
---|
| 179 | |
---|
[2d19ed6c] | 180 | @subsection Set File Access and Modification Times |
---|
[0874502] | 181 | |
---|
| 182 | @example |
---|
[6984a19] | 183 | struct utimbuf, Type, Unimplemented |
---|
[2a087f3] | 184 | utime(), Function, Unimplemented |
---|
[0874502] | 185 | @end example |
---|
| 186 | |
---|
[2d19ed6c] | 187 | @subsection Truncate a File to a Specified Length |
---|
[0874502] | 188 | |
---|
| 189 | @example |
---|
[2a087f3] | 190 | ftruncate(), Function, Unimplemented |
---|
[0874502] | 191 | @end example |
---|
| 192 | |
---|
[2d19ed6c] | 193 | @section Configurable Pathname Variable |
---|
[0874502] | 194 | |
---|
[7331714] | 195 | @subsection Get Configurable Pathname Variables |
---|
| 196 | |
---|
[0874502] | 197 | @example |
---|
[2a087f3] | 198 | pathconf(), Function, Unimplemented |
---|
| 199 | fpathconf(), Function, Unimplemented |
---|
[7331714] | 200 | _PC_LINK_MAX, Constant, |
---|
| 201 | _PC_MAX_CANON, Constant, |
---|
| 202 | _PC_MAX_INPUT, Constant, |
---|
| 203 | _PC_MAX_INPUT, Constant, |
---|
| 204 | _PC_NAME_MAX, Constant, |
---|
| 205 | _PC_PATH_MAX, Constant, |
---|
| 206 | _PC_PIPE_BUF, Constant, |
---|
| 207 | _PC_ASYNC_IO, Constant, |
---|
| 208 | _PC_CHOWN_RESTRICTED, Constant, |
---|
| 209 | _PC_NO_TRUNC, Constant, |
---|
| 210 | _PC_PRIO_IO, Constant, |
---|
| 211 | _PC_SYNC_IO, Constant, |
---|
| 212 | _PC_VDISABLE, Constant, |
---|
[0874502] | 213 | @end example |
---|
| 214 | |
---|