| | @@ -956,6 +956,7 @@ |
| 956 | 956 | Info* = record |
| 957 | 957 | size*: I64; (* in bytes *) |
| 958 | 958 | dir*: BOOL; (* a directory *) |
| 959 | + file*: BOOL; (* a regular file: not a directory, device, pipe or socket *) |
| 959 | 960 | link*: BOOL; (* the path itself is a symbolic link *) |
| 960 | 961 | end; |
| 961 | 962 | Dir* = record ... end; (* an open directory; its fields are the target's *) |
| | @@ -988,10 +989,11 @@ |
| 988 | 989 | proc kill*(pid, signal: I64): I64; |
| 989 | 990 | ``` |
| 990 | 991 | |
| 991 | | -`info` follows a symbolic link: `size` and `dir` are those of what it |
| 992 | | -names, and `link` says the path was a link, so that a program walking |
| 992 | +`info` follows a symbolic link: `size`, `dir` and `file` are those of |
| 993 | +what it names, and `link` says the path was a link, so that a program walking |
| 993 | 994 | a tree can choose not to follow one back up it. A link to nothing is |
| 994 | | -`-ENOENT`, as a missing file is. |
| 995 | +`-ENOENT`, as a missing file is. `file` lets a walk open only what |
| 996 | +holds data: opening a pipe would wait for a program to write to it. |
| 995 | 997 | |
| 996 | 998 | `nextEntry` gives every name in the directory except `.` and `..`, in |
| 997 | 999 | no particular order. `rawMode` turns off what the terminal does with |
| | @@ -1077,7 +1079,7 @@ |
| 1077 | 1079 | - **2026-10.5.** A module with files in more than one of the |
| 1078 | 1080 | directories searched is an error, unless the first is a link to one |
| 1079 | 1081 | of the others (section 3). |
| 1080 | | -- **2026-10.6.** `Sys.Info` says whether the path is a symbolic link |
| 1081 | | - (section 11). |
| 1082 | +- **2026-10.6.** `Sys.Info` says whether the path is a regular file, |
| 1083 | + and whether it is a symbolic link (section 11). |
| 1082 | 1084 | - **2026-10.7.** `Sys.send` writes to a socket without SIGPIPE |
| 1083 | 1085 | (section 11). |