raz / commit e5d6772a

commit
e5d6772aa45db2ba975dc081dd1a4c46db747558
author
Luis <42945842+ldiaz94@users.noreply.github.com>
date
parent
85f4b88c
The report: Sys.Info tells a regular file too (2026-10.6)

rloc walks a tree and opens what it finds; a pipe would block it.

patch · log

1 file changed, +7 -5

doc/raz.md (history) modified +7 -5

@@ -956,6 +956,7 @@
956956 Info* = record
957957 size*: I64; (* in bytes *)
958958 dir*: BOOL; (* a directory *)
959+ file*: BOOL; (* a regular file: not a directory, device, pipe or socket *)
959960 link*: BOOL; (* the path itself is a symbolic link *)
960961 end;
961962 Dir* = record ... end; (* an open directory; its fields are the target's *)
@@ -988,10 +989,11 @@
988989 proc kill*(pid, signal: I64): I64;
989990 ```
990991
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
993994 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.
995997
996998 `nextEntry` gives every name in the directory except `.` and `..`, in
997999 no particular order. `rawMode` turns off what the terminal does with
@@ -1077,7 +1079,7 @@
10771079 - **2026-10.5.** A module with files in more than one of the
10781080 directories searched is an error, unless the first is a link to one
10791081 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).
10821084 - **2026-10.7.** `Sys.send` writes to a socket without SIGPIPE
10831085 (section 11).