Stdlib module kernel/fileio.vitl
This page is a wiki-style reference for one concrete stdlib file. It explains what the file owns, where it fits in the family, and how to decide whether this is the right surface to depend on.
kernel/fileio.vitl.Family: kernel
Kind: public stdlib surface
Page style: this reference follows the same “encyclopedic card + portrait + usage contract” logic as the keyword pages, but for stdlib modules.
Summary
- Overview
- Purpose
- Taxonomy
- Implementation profile
- Top-level API inventory
- Position in family
- Declaration map
- Representative signatures
- How to use this module
- User example
- Keyword coverage
- Source shape
- Source landmarks
- Source organization
- Complete API catalog
- Integration boundaries
- Composition guidance
- Relationship table
- Neighbor modules
Overview
| Field | Value |
|---|---|
| Path | kernel/fileio.vitl |
| Family | kernel |
| Kind | public stdlib surface |
| Line count | 364 |
| Declared procedures | 44 |
| Declared forms/picks | 2 |
`kernel/fileio.vitl` is a public stdlib surface inside the `kernel` family. It should be read as one focused slice of the broader family responsibility: System-facing runtime helpers such as process, scheduler, threads, sync, users, signals, network, device, and memory.
Purpose
This file should be chosen because of responsibility, not because its name “sounds close enough”. Inside the kernel family, it carries one focused part of the contract and keeps that responsibility separate from neighboring concerns.
- Use this module when bytes or paths cross a host boundary and architecture must keep that boundary visible.
- A service manager may use scheduler, process, and signals while keeping policy in separate code.
- A network-facing runtime should explain why it depends on kernel surfaces instead of lighter families.
Taxonomy
Think of this page as a generated encyclopedia entry rather than a hand-written tutorial. The goal is to show what kind of module this is, how dense it is, and what reading strategy makes sense before depending on it.
- Large algorithm surface: this file exposes many procedures and likely acts as a domain toolkit rather than a single thin wrapper.
- Owns domain vocabulary: the module declares data shapes in addition to executable helpers, so its types are part of the contract.
- Has tuning constants: part of the module behavior is controlled by named constants that document default precision, limits, or policy.
- Minimal top-level dependencies: the module reads as mostly self-contained from its opening declarations.
- Explicit export surface: the file ends with visible export declarations instead of relying only on implicit namespace discovery.
Implementation profile
This profile is inferred directly from the source text. It does not replace reading the file, but it tells you quickly whether the module is mostly declarative, loop-heavy, branch-heavy, or organized around many small exits.
| Signal | Count | What it suggests |
|---|---|---|
if | 0 | Branching density and local decision-making. |
while | 0 | Loop-heavy or iterative implementation style. |
for | 0 | Collection-style traversal at source level. |
match | 0 | Variant-driven branching or grammar-style decoding. |
let | 0 | Local state and intermediate value density. |
give | 42 | Number of explicit exit points and result shaping. |
Top-level API inventory
| Surface | Items |
|---|---|
| Procedures | open, creat, close, read, write, lseek, pread, pwrite, fsync, fdatasync, dup, dup2 |
| Forms | DirEnt, FileStat |
| Picks | none declared at top level |
| Constants | STDIN_FILENO, STDOUT_FILENO, STDERR_FILENO, O_RDONLY, O_WRONLY, O_RDWR, O_APPEND, O_CREAT, O_EXCL, O_TRUNC, O_NONBLOCK, O_SYNC |
| Exports | * |
Imported surfaces
This file does not advertise a top-level `use` surface in its opening declarations. That often means it is either self-contained or an aggregation layer.
Position in family
This file is module 3 of 12 in the kernel family when ordered by path. By procedure count it ranks 2, and by line count it ranks 1. Those ranks are useful as rough signals of breadth, not as quality judgments.
Declaration map
The declaration map turns raw source into a scan-friendly catalog. It is useful when the file is large enough that a reader wants to orient by kinds of surfaces first.
| Line | Name | Kind | Role |
|---|---|---|---|
| 1 | vitte/kernel_name/fileio | space | Declares the namespace that anchors this file in the stdlib tree. |
| 9 | STDIN_FILENO | const | Defines a named constant reused across the module. |
| 10 | STDOUT_FILENO | const | Defines a named constant reused across the module. |
| 11 | STDERR_FILENO | const | Defines a named constant reused across the module. |
| 14 | O_RDONLY | const | Defines a named constant reused across the module. |
| 15 | O_WRONLY | const | Defines a named constant reused across the module. |
| 16 | O_RDWR | const | Defines a named constant reused across the module. |
| 17 | O_APPEND | const | Defines a named constant reused across the module. |
| 18 | O_CREAT | const | Defines a named constant reused across the module. |
| 19 | O_EXCL | const | Defines a named constant reused across the module. |
| 20 | O_TRUNC | const | Defines a named constant reused across the module. |
| 21 | O_NONBLOCK | const | Defines a named constant reused across the module. |
| 22 | O_SYNC | const | Defines a named constant reused across the module. |
| 25 | S_IRUSR | const | Defines a named constant reused across the module. |
| 26 | S_IWUSR | const | Defines a named constant reused across the module. |
| 27 | S_IXUSR | const | Defines a named constant reused across the module. |
| 28 | S_IRGRP | const | Defines a named constant reused across the module. |
| 29 | S_IWGRP | const | Defines a named constant reused across the module. |
| 30 | S_IXGRP | const | Defines a named constant reused across the module. |
| 31 | S_IROTH | const | Defines a named constant reused across the module. |
| 32 | S_IWOTH | const | Defines a named constant reused across the module. |
| 33 | S_IXOTH | const | Defines a named constant reused across the module. |
| 36 | S_ISREG | const | Defines a named constant reused across the module. |
| 37 | S_ISDIR | const | Defines a named constant reused across the module. |
| 38 | S_ISCHR | const | Defines a named constant reused across the module. |
| 39 | S_ISBLK | const | Defines a named constant reused across the module. |
| 40 | S_ISFIFO | const | Defines a named constant reused across the module. |
| 41 | S_ISLNK | const | Defines a named constant reused across the module. |
| 42 | S_ISSOCK | const | Defines a named constant reused across the module. |
| 45 | SEEK_SET | const | Defines a named constant reused across the module. |
| 46 | SEEK_CUR | const | Defines a named constant reused across the module. |
| 47 | SEEK_END | const | Defines a named constant reused across the module. |
| 50 | DirEnt | form | Introduces a structured data shape that other procedures can exchange. |
| 59 | FileStat | form | Introduces a structured data shape that other procedures can exchange. |
| 79 | open | proc | Represents one top-level surface in the file contract and should be read as part of the module boundary. |
| 84 | creat | proc | Represents one top-level surface in the file contract and should be read as part of the module boundary. |
| 89 | close | proc | Represents one top-level surface in the file contract and should be read as part of the module boundary. |
| 94 | read | proc | Owns byte movement or host I/O interaction. |
| 99 | write | proc | Owns byte movement or host I/O interaction. |
| 104 | lseek | proc | Represents one top-level surface in the file contract and should be read as part of the module boundary. |
| 109 | pread | proc | Represents one top-level surface in the file contract and should be read as part of the module boundary. |
| 114 | pwrite | proc | Represents one top-level surface in the file contract and should be read as part of the module boundary. |
| 119 | fsync | proc | Represents one top-level surface in the file contract and should be read as part of the module boundary. |
| 124 | fdatasync | proc | Represents one top-level surface in the file contract and should be read as part of the module boundary. |
| 133 | dup | proc | Represents one top-level surface in the file contract and should be read as part of the module boundary. |
| 138 | dup2 | proc | Represents one top-level surface in the file contract and should be read as part of the module boundary. |
| 143 | fcntl | proc | Represents one top-level surface in the file contract and should be read as part of the module boundary. |
| 148 | ioctl | proc | Represents one top-level surface in the file contract and should be read as part of the module boundary. |
| 153 | ftruncate | proc | Represents one top-level surface in the file contract and should be read as part of the module boundary. |
| 158 | flock | proc | Represents one top-level surface in the file contract and should be read as part of the module boundary. |
| 167 | mkdir | proc | Represents one top-level surface in the file contract and should be read as part of the module boundary. |
| 172 | rmdir | proc | Represents one top-level surface in the file contract and should be read as part of the module boundary. |
| 177 | opendir | proc | Represents one top-level surface in the file contract and should be read as part of the module boundary. |
| 182 | closedir | proc | Represents one top-level surface in the file contract and should be read as part of the module boundary. |
| 187 | readdir | proc | Represents one top-level surface in the file contract and should be read as part of the module boundary. |
| 198 | rewinddir | proc | Represents one top-level surface in the file contract and should be read as part of the module boundary. |
| 202 | chdir | proc | Represents one top-level surface in the file contract and should be read as part of the module boundary. |
| 207 | getcwd | proc | Represents one top-level surface in the file contract and should be read as part of the module boundary. |
| 212 | listdir | proc | Represents one top-level surface in the file contract and should be read as part of the module boundary. |
| 221 | unlink | proc | Represents one top-level surface in the file contract and should be read as part of the module boundary. |
| 226 | link | proc | Represents one top-level surface in the file contract and should be read as part of the module boundary. |
| 231 | symlink | proc | Represents one top-level surface in the file contract and should be read as part of the module boundary. |
| 236 | readlink | proc | Represents one top-level surface in the file contract and should be read as part of the module boundary. |
| 241 | rename | proc | Represents one top-level surface in the file contract and should be read as part of the module boundary. |
| 246 | chmod | proc | Represents one top-level surface in the file contract and should be read as part of the module boundary. |
| 251 | fchmod | proc | Represents one top-level surface in the file contract and should be read as part of the module boundary. |
| 256 | chown | proc | Represents one top-level surface in the file contract and should be read as part of the module boundary. |
| 261 | fchown | proc | Represents one top-level surface in the file contract and should be read as part of the module boundary. |
| 270 | stat | proc | Represents one top-level surface in the file contract and should be read as part of the module boundary. |
| 289 | fstat | proc | Represents one top-level surface in the file contract and should be read as part of the module boundary. |
| 308 | lstat | proc | Represents one top-level surface in the file contract and should be read as part of the module boundary. |
| 327 | access | proc | Represents one top-level surface in the file contract and should be read as part of the module boundary. |
| 332 | truncate | proc | Represents one top-level surface in the file contract and should be read as part of the module boundary. |
| 341 | statvfs | proc | Represents one top-level surface in the file contract and should be read as part of the module boundary. |
| 346 | pathconf | proc | Represents one top-level surface in the file contract and should be read as part of the module boundary. |
| 351 | fpathconf | proc | Represents one top-level surface in the file contract and should be read as part of the module boundary. |
| 356 | sync | proc | Represents one top-level surface in the file contract and should be read as part of the module boundary. |
| 360 | umask | proc | Represents one top-level surface in the file contract and should be read as part of the module boundary. |
The table is exhaustive for top-level declarations of the selected kinds. This file declares 78 matching surfaces.
Representative signatures
These signatures are shown in source order so the page keeps the feel of a reference manual, not just a keyword cloud.
const STDIN_FILENO: i32 = 0(line 9)const STDOUT_FILENO: i32 = 1(line 10)const STDERR_FILENO: i32 = 2(line 11)const O_RDONLY: i32 = 0(line 14)const O_WRONLY: i32 = 1(line 15)const O_RDWR: i32 = 2(line 16)const O_APPEND: i32 = 1024(line 17)const O_CREAT: i32 = 64(line 18)const O_EXCL: i32 = 128(line 19)const O_TRUNC: i32 = 512(line 20)const O_NONBLOCK: i32 = 2048(line 21)const O_SYNC: i32 = 4096(line 22)const S_IRUSR: i32 = 256(line 25)const S_IWUSR: i32 = 128(line 26)const S_IXUSR: i32 = 64(line 27)const S_IRGRP: i32 = 32(line 28)const S_IWGRP: i32 = 16(line 29)const S_IXGRP: i32 = 8(line 30)
The list is intentionally capped here; the source file declares 77 matching signatures in total.
How to use this module
Start by reading the file as an ownership boundary. Ask three questions: what enters this module, what stable types or procedures it exports, and what adjacent module should stay outside of it.
- Read
spaceand top-level imports first so the ownership boundary ofkernel/fileio.vitlis explicit. - Scan constants before procedures; they often encode precision, limits, or policy assumptions that explain later behavior.
- Read declared forms and picks before algorithms so the data vocabulary is stable in your head.
- Traverse procedures in source order; the early helpers usually explain the naming and numeric conventions used later.
- Use the source landmarks section below as a table of contents when the file is large.
User example
This example is generated from the actual stdlib module surface. Its job is not to be the smallest snippet possible; its job is to show a realistic consumer-shaped file that exercises the module and mirrors the language keywords the module itself relies on.
space demo/kernel_fileio
const SAMPLE_LABEL: string = "demo"
form UserReport {
label: string,
ready: bool
}
proc run_example() -> UserReport {
let stable: bool = ready and true
give UserReport { label: "ok", ready: ready }
}
export run_example
Keyword coverage
This table makes the “all keywords of the module” requirement auditable. It compares the detected Vitte keywords in the source file with the generated consumer example above.
| Keyword | Present in module source | Used in generated user example |
|---|---|---|
space | yes | yes |
const | yes | yes |
form | yes | yes |
proc | yes | yes |
give | yes | yes |
return | yes | no |
at | yes | no |
export | yes | yes |
and | yes | yes |
Keywords still not exercised directly in the generated snippet: return, at. The page still lists them here so the gap is visible.
Source shape
space vitte/kernel_name/fileio
// File descriptor constants
const STDIN_FILENO: i32 = 0
const STDOUT_FILENO: i32 = 1
const STDERR_FILENO: i32 = 2
// File open flag_bits
const O_RDONLY: i32 = 0
const O_WRONLY: i32 = 1
const O_RDWR: i32 = 2
const O_APPEND: i32 = 1024
The excerpt is not meant to replace the file. It exists to make the module recognizable at first glance, the same way a Wikipedia infobox helps the reader orient before reading the whole article.
Source landmarks
Large files are easier to retain when they have visible landmarks. When the source contains explicit section banners, they are surfaced here; otherwise the first major declarations are used as anchors.
- Kernel File I/O — File descriptor operations, / Directory operations, file system management
- File Descriptor Operations
- File Descriptor Control
- Directory Operations
- File Management
- File Information
- File System Operations
Source organization
When a file carries its own internal chaptering, those chapters usually reveal the intended reading order better than a flat symbol list. This section reconstructs that organization from the source itself.
Opening declarations
Top-level items: 1. Procedures: 0. Data surfaces: 0. Constants: 0.
First visible names: vitte/kernel_name/fileio
Kernel File I/O — File descriptor operations, / Directory operations, file system management
Top-level items: 33. Procedures: 0. Data surfaces: 2. Constants: 31.
First visible names: STDIN_FILENO, STDOUT_FILENO, STDERR_FILENO, O_RDONLY, O_WRONLY, O_RDWR, O_APPEND, O_CREAT, O_EXCL, O_TRUNC
File Descriptor Operations
Top-level items: 10. Procedures: 10. Data surfaces: 0. Constants: 0.
First visible names: open, creat, close, read, write, lseek, pread, pwrite, fsync, fdatasync
File Descriptor Control
Top-level items: 6. Procedures: 6. Data surfaces: 0. Constants: 0.
First visible names: dup, dup2, fcntl, ioctl, ftruncate, flock
Directory Operations
Top-level items: 9. Procedures: 9. Data surfaces: 0. Constants: 0.
First visible names: mkdir, rmdir, opendir, closedir, readdir, rewinddir, chdir, getcwd, listdir
File Management
Top-level items: 9. Procedures: 9. Data surfaces: 0. Constants: 0.
First visible names: unlink, link, symlink, readlink, rename, chmod, fchmod, chown, fchown
File Information
Top-level items: 5. Procedures: 5. Data surfaces: 0. Constants: 0.
First visible names: stat, fstat, lstat, access, truncate
File System Operations
Top-level items: 6. Procedures: 5. Data surfaces: 0. Constants: 0.
First visible names: statvfs, pathconf, fpathconf, sync, umask, *
Complete API catalog
This catalog is the exhaustive file-level index for the module. It is intentionally closer to a generated encyclopedia appendix than to a tutorial summary.
Constants
| Line | Name | Signature | Role |
|---|---|---|---|
| 9 | STDIN_FILENO | const STDIN_FILENO: i32 = 0 | Defines a named constant reused across the module. |
| 10 | STDOUT_FILENO | const STDOUT_FILENO: i32 = 1 | Defines a named constant reused across the module. |
| 11 | STDERR_FILENO | const STDERR_FILENO: i32 = 2 | Defines a named constant reused across the module. |
| 14 | O_RDONLY | const O_RDONLY: i32 = 0 | Defines a named constant reused across the module. |
| 15 | O_WRONLY | const O_WRONLY: i32 = 1 | Defines a named constant reused across the module. |
| 16 | O_RDWR | const O_RDWR: i32 = 2 | Defines a named constant reused across the module. |
| 17 | O_APPEND | const O_APPEND: i32 = 1024 | Defines a named constant reused across the module. |
| 18 | O_CREAT | const O_CREAT: i32 = 64 | Defines a named constant reused across the module. |
| 19 | O_EXCL | const O_EXCL: i32 = 128 | Defines a named constant reused across the module. |
| 20 | O_TRUNC | const O_TRUNC: i32 = 512 | Defines a named constant reused across the module. |
| 21 | O_NONBLOCK | const O_NONBLOCK: i32 = 2048 | Defines a named constant reused across the module. |
| 22 | O_SYNC | const O_SYNC: i32 = 4096 | Defines a named constant reused across the module. |
| 25 | S_IRUSR | const S_IRUSR: i32 = 256 | Defines a named constant reused across the module. |
| 26 | S_IWUSR | const S_IWUSR: i32 = 128 | Defines a named constant reused across the module. |
| 27 | S_IXUSR | const S_IXUSR: i32 = 64 | Defines a named constant reused across the module. |
| 28 | S_IRGRP | const S_IRGRP: i32 = 32 | Defines a named constant reused across the module. |
| 29 | S_IWGRP | const S_IWGRP: i32 = 16 | Defines a named constant reused across the module. |
| 30 | S_IXGRP | const S_IXGRP: i32 = 8 | Defines a named constant reused across the module. |
| 31 | S_IROTH | const S_IROTH: i32 = 4 | Defines a named constant reused across the module. |
| 32 | S_IWOTH | const S_IWOTH: i32 = 2 | Defines a named constant reused across the module. |
| 33 | S_IXOTH | const S_IXOTH: i32 = 1 | Defines a named constant reused across the module. |
| 36 | S_ISREG | const S_ISREG: i32 = 32768 | Defines a named constant reused across the module. |
| 37 | S_ISDIR | const S_ISDIR: i32 = 16384 | Defines a named constant reused across the module. |
| 38 | S_ISCHR | const S_ISCHR: i32 = 8192 | Defines a named constant reused across the module. |
| 39 | S_ISBLK | const S_ISBLK: i32 = 24576 | Defines a named constant reused across the module. |
| 40 | S_ISFIFO | const S_ISFIFO: i32 = 4096 | Defines a named constant reused across the module. |
| 41 | S_ISLNK | const S_ISLNK: i32 = 40960 | Defines a named constant reused across the module. |
| 42 | S_ISSOCK | const S_ISSOCK: i32 = 49152 | Defines a named constant reused across the module. |
| 45 | SEEK_SET | const SEEK_SET: i32 = 0 | Defines a named constant reused across the module. |
| 46 | SEEK_CUR | const SEEK_CUR: i32 = 1 | Defines a named constant reused across the module. |
| 47 | SEEK_END | const SEEK_END: i32 = 2 | Defines a named constant reused across the module. |
Data surfaces
| Line | Name | Signature | Role |
|---|---|---|---|
| 50 | DirEnt | form DirEnt { | Introduces a structured data shape that other procedures can exchange. |
| 59 | FileStat | form FileStat { | Introduces a structured data shape that other procedures can exchange. |
Procedures
| Line | Name | Signature | Role |
|---|---|---|---|
| 79 | open | proc open(path: string, flag_bits: i32, mode: i32) -> i32 { | Represents one top-level surface in the file contract and should be read as part of the module boundary. |
| 84 | creat | proc creat(path: string, mode: i32) -> i32 { | Represents one top-level surface in the file contract and should be read as part of the module boundary. |
| 89 | close | proc close(fd: i32) -> int { | Represents one top-level surface in the file contract and should be read as part of the module boundary. |
| 94 | read | proc read(fd: i32, nbytes: i64) -> string { | Owns byte movement or host I/O interaction. |
| 99 | write | proc write(fd: i32, buf: string) -> i64 { | Owns byte movement or host I/O interaction. |
| 104 | lseek | proc lseek(fd: i32, offset: i64, whence: i32) -> i64 { | Represents one top-level surface in the file contract and should be read as part of the module boundary. |
| 109 | pread | proc pread(fd: i32, offset: i64, nbytes: i64) -> string { | Represents one top-level surface in the file contract and should be read as part of the module boundary. |
| 114 | pwrite | proc pwrite(fd: i32, buf: string, offset: i64) -> i64 { | Represents one top-level surface in the file contract and should be read as part of the module boundary. |
| 119 | fsync | proc fsync(fd: i32) -> int { | Represents one top-level surface in the file contract and should be read as part of the module boundary. |
| 124 | fdatasync | proc fdatasync(fd: i32) -> int { | Represents one top-level surface in the file contract and should be read as part of the module boundary. |
| 133 | dup | proc dup(fd: i32) -> i32 { | Represents one top-level surface in the file contract and should be read as part of the module boundary. |
| 138 | dup2 | proc dup2(oldfd: i32, newfd: i32) -> i32 { | Represents one top-level surface in the file contract and should be read as part of the module boundary. |
| 143 | fcntl | proc fcntl(fd: i32, cmd: i32, arg: i32) -> int { | Represents one top-level surface in the file contract and should be read as part of the module boundary. |
| 148 | ioctl | proc ioctl(fd: i32, request: i32, arg: i32) -> int { | Represents one top-level surface in the file contract and should be read as part of the module boundary. |
| 153 | ftruncate | proc ftruncate(fd: i32, length: i64) -> int { | Represents one top-level surface in the file contract and should be read as part of the module boundary. |
| 158 | flock | proc flock(fd: i32, operation: i32) -> int { | Represents one top-level surface in the file contract and should be read as part of the module boundary. |
| 167 | mkdir | proc mkdir(path: string, mode: i32) -> int { | Represents one top-level surface in the file contract and should be read as part of the module boundary. |
| 172 | rmdir | proc rmdir(path: string) -> int { | Represents one top-level surface in the file contract and should be read as part of the module boundary. |
| 177 | opendir | proc opendir(path: string) -> i32 { | Represents one top-level surface in the file contract and should be read as part of the module boundary. |
| 182 | closedir | proc closedir(dirfd: i32) -> int { | Represents one top-level surface in the file contract and should be read as part of the module boundary. |
| 187 | readdir | proc readdir(dirfd: i32) -> DirEnt { | Represents one top-level surface in the file contract and should be read as part of the module boundary. |
| 198 | rewinddir | proc rewinddir(dirfd: i32) { | Represents one top-level surface in the file contract and should be read as part of the module boundary. |
| 202 | chdir | proc chdir(path: string) -> int { | Represents one top-level surface in the file contract and should be read as part of the module boundary. |
| 207 | getcwd | proc getcwd() -> string { | Represents one top-level surface in the file contract and should be read as part of the module boundary. |
| 212 | listdir | proc listdir(path: string) -> [string] { | Represents one top-level surface in the file contract and should be read as part of the module boundary. |
| 221 | unlink | proc unlink(path: string) -> int { | Represents one top-level surface in the file contract and should be read as part of the module boundary. |
| 226 | link | proc link(oldpath: string, newpath: string) -> int { | Represents one top-level surface in the file contract and should be read as part of the module boundary. |
| 231 | symlink | proc symlink(oldpath: string, newpath: string) -> int { | Represents one top-level surface in the file contract and should be read as part of the module boundary. |
| 236 | readlink | proc readlink(path: string) -> string { | Represents one top-level surface in the file contract and should be read as part of the module boundary. |
| 241 | rename | proc rename(oldpath: string, newpath: string) -> int { | Represents one top-level surface in the file contract and should be read as part of the module boundary. |
| 246 | chmod | proc chmod(path: string, mode: i32) -> int { | Represents one top-level surface in the file contract and should be read as part of the module boundary. |
| 251 | fchmod | proc fchmod(fd: i32, mode: i32) -> int { | Represents one top-level surface in the file contract and should be read as part of the module boundary. |
| 256 | chown | proc chown(path: string, uid: i32, gid: i32) -> int { | Represents one top-level surface in the file contract and should be read as part of the module boundary. |
| 261 | fchown | proc fchown(fd: i32, uid: i32, gid: i32) -> int { | Represents one top-level surface in the file contract and should be read as part of the module boundary. |
| 270 | stat | proc stat(path: string) -> FileStat { | Represents one top-level surface in the file contract and should be read as part of the module boundary. |
| 289 | fstat | proc fstat(fd: i32) -> FileStat { | Represents one top-level surface in the file contract and should be read as part of the module boundary. |
| 308 | lstat | proc lstat(path: string) -> FileStat { | Represents one top-level surface in the file contract and should be read as part of the module boundary. |
| 327 | access | proc access(path: string, mode: i32) -> int { | Represents one top-level surface in the file contract and should be read as part of the module boundary. |
| 332 | truncate | proc truncate(path: string, length: i64) -> int { | Represents one top-level surface in the file contract and should be read as part of the module boundary. |
| 341 | statvfs | proc statvfs(path: string) -> [i64] { | Represents one top-level surface in the file contract and should be read as part of the module boundary. |
| 346 | pathconf | proc pathconf(path: string, name: string) -> i64 { | Represents one top-level surface in the file contract and should be read as part of the module boundary. |
| 351 | fpathconf | proc fpathconf(fd: i32, name: string) -> i64 { | Represents one top-level surface in the file contract and should be read as part of the module boundary. |
| 356 | sync | proc sync() { | Represents one top-level surface in the file contract and should be read as part of the module boundary. |
| 360 | umask | proc umask(mask: i32) -> i32 { | Represents one top-level surface in the file contract and should be read as part of the module boundary. |
Exports
| Line | Name | Signature | Role |
|---|---|---|---|
| 364 | * | export * | Re-exports surfaces that the module wants to expose as part of its public boundary. |
Integration boundaries
Within kernel, this file should remain focused. If a future helper changes the host boundary, scheduling boundary, or data-shape boundary, it probably belongs in a neighbor module instead of being added here by convenience.
- Family responsibility: System-facing runtime helpers such as process, scheduler, threads, sync, users, signals, network, device, and memory.
- Family architecture role: Use `kernel` when the program explicitly models system services, scheduling, process behavior, or device-facing coordination.
Composition guidance
Choose this module when
- Choose
kernel/fileio.vitlwhen the main question is owned by this module rather than by transport, storage, orchestration, or user-interface code. - Use this module when bytes or paths cross a host boundary and architecture must keep that boundary visible.
- A service manager may use scheduler, process, and signals while keeping policy in separate code.
- A network-facing runtime should explain why it depends on kernel surfaces instead of lighter families.
Pause before extending it when
- Avoid extending this file when the new helper mostly changes the boundary to host I/O, runtime coordination, or foreign integration instead of staying inside
kernel. - Check nearby modules such as
kernel/device.vitl,kernel/interrupt.vitl,kernel/memory.vitlbefore adding convenience wrappers here.
Relationship table
This table keeps the page closer to a real encyclopedia entry: a module is easier to understand when compared with its nearest alternatives in the same family.
| Neighbor | Procedures | Data surfaces | Why compare it |
|---|---|---|---|
kernel/device.vitl | 0 | 0 | Shares the same family boundary but carries a distinct slice of responsibility. |
kernel/interrupt.vitl | 9 | 0 | Shares the same family boundary but carries a distinct slice of responsibility. |
kernel/memory.vitl | 18 | 1 | Shares the same family boundary but carries a distinct slice of responsibility. |
kernel/network.vitl | 42 | 4 | Shares the same family boundary but carries a distinct slice of responsibility. |
kernel/process.vitl | 14 | 2 | Shares the same family boundary but carries a distinct slice of responsibility. |
kernel/scheduler.vitl | 1 | 0 | Shares the same family boundary but carries a distinct slice of responsibility. |
kernel/signals.vitl | 18 | 1 | Shares the same family boundary but carries a distinct slice of responsibility. |
kernel/sync.vitl | 34 | 6 | Shares the same family boundary but carries a distinct slice of responsibility. |