Stdlib module path/manipulation.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.

Visual portrait of path/manipulation.vitl
Wiki-style portrait for path/manipulation.vitl.

Family: path

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

FieldValue
Pathpath/manipulation.vitl
Familypath
Kindpublic stdlib surface
Line count222
Declared procedures40
Declared forms/picks4

`path/manipulation.vitl` is a public stdlib surface inside the `path` family. It should be read as one focused slice of the broader family responsibility: Path manipulation, special locations, walkers, and globbing.

Purpose

This file should be chosen because of responsibility, not because its name “sounds close enough”. Inside the path family, it carries one focused part of the contract and keeps that responsibility separate from neighboring concerns.

  • A project root can be normalized before any file is read.
  • A walker can enumerate source files while parsing and diagnostics remain elsewhere.

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.

SignalCountWhat it suggests
if0Branching density and local decision-making.
while0Loop-heavy or iterative implementation style.
for1Collection-style traversal at source level.
match0Variant-driven branching or grammar-style decoding.
let2Local state and intermediate value density.
give40Number of explicit exit points and result shaping.

Top-level API inventory

SurfaceItems
Procedurespath_new, path_normalize, path_resolve, path_absolute, path_relative, path_get_parent, path_get_filename, path_get_basename, path_get_stem, path_get_extension, path_get_directory, path_get_root
FormsPath, PathManipulationManifest, PathManipulationHealth, PathManipulationSummary
Picksnone declared at top level
ConstantsPATH_SEPARATOR, PATH_DELIMITER
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 5 in the path family when ordered by path. By procedure count it ranks 2, and by line count it ranks 2. 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.

LineNameKindRole
1vitte/path/manipulationspaceDeclares the namespace that anchors this file in the stdlib tree.
8PATH_SEPARATORconstDefines a named constant reused across the module.
9PATH_DELIMITERconstDefines a named constant reused across the module.
11PathformIntroduces a structured data shape that other procedures can exchange.
16PathManipulationManifestformIntroduces a structured data shape that other procedures can exchange.
23PathManipulationHealthformIntroduces a structured data shape that other procedures can exchange.
30PathManipulationSummaryformIntroduces a structured data shape that other procedures can exchange.
36path_newprocOwns path semantics, traversal, or normalization.
43path_normalizeprocOwns path semantics, traversal, or normalization.
47path_resolveprocOwns path semantics, traversal, or normalization.
51path_absoluteprocOwns path semantics, traversal, or normalization.
55path_relativeprocOwns path semantics, traversal, or normalization.
60path_get_parentprocOwns path semantics, traversal, or normalization.
64path_get_filenameprocOwns path semantics, traversal, or normalization.
68path_get_basenameprocOwns path semantics, traversal, or normalization.
72path_get_stemprocOwns path semantics, traversal, or normalization.
76path_get_extensionprocOwns path semantics, traversal, or normalization.
80path_get_directoryprocOwns path semantics, traversal, or normalization.
84path_get_rootprocOwns path semantics, traversal, or normalization.
89path_joinprocOwns path semantics, traversal, or normalization.
93path_join_multiprocOwns path semantics, traversal, or normalization.
97path_with_extensionprocOwns path semantics, traversal, or normalization.
101path_with_filenameprocOwns path semantics, traversal, or normalization.
106path_existsprocOwns path semantics, traversal, or normalization.
110path_is_fileprocOwns path semantics, traversal, or normalization.
114path_is_dirprocOwns path semantics, traversal, or normalization.
118path_is_symlinkprocOwns path semantics, traversal, or normalization.
122path_is_absoluteprocOwns path semantics, traversal, or normalization.
126path_is_relativeprocOwns path semantics, traversal, or normalization.
130path_is_hiddenprocOwns path semantics, traversal, or normalization.
135path_equalsprocOwns path semantics, traversal, or normalization.
139path_starts_withprocOwns path semantics, traversal, or normalization.
143path_ends_withprocOwns path semantics, traversal, or normalization.
148path_cleanprocOwns path semantics, traversal, or normalization.
152path_canonicalizeprocOwns path semantics, traversal, or normalization.
156path_simplifyprocOwns path semantics, traversal, or normalization.
160path_expand_homeprocOwns path semantics, traversal, or normalization.
164path_expand_envprocOwns path semantics, traversal, or normalization.
168path_versionprocOwns path semantics, traversal, or normalization.
172path_readyprocOwns path semantics, traversal, or normalization.
176manipulation_versionprocRepresents one top-level surface in the file contract and should be read as part of the module boundary.
180manipulation_readyprocRepresents one top-level surface in the file contract and should be read as part of the module boundary.
184manipulation_manifestprocRepresents one top-level surface in the file contract and should be read as part of the module boundary.
193manipulation_healthprocRepresents one top-level surface in the file contract and should be read as part of the module boundary.
202manipulation_summaryprocRepresents one top-level surface in the file contract and should be read as part of the module boundary.
209path_reportprocOwns path semantics, traversal, or normalization.
213path_selftestprocOwns path semantics, traversal, or normalization.

The table is exhaustive for top-level declarations of the selected kinds. This file declares 47 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 PATH_SEPARATOR: string = "/" (line 8)
  • const PATH_DELIMITER: string = ":" (line 9)
  • form Path { (line 11)
  • form PathManipulationManifest { (line 16)
  • form PathManipulationHealth { (line 23)
  • form PathManipulationSummary { (line 30)
  • proc path_new(p: string) -> Path { (line 36)
  • proc path_normalize(p: string) -> string { (line 43)
  • proc path_resolve(p: string) -> string { (line 47)
  • proc path_absolute(p: string) -> string { (line 51)
  • proc path_relative(base: string, target: string) -> string { (line 55)
  • proc path_get_parent(p: string) -> string { (line 60)
  • proc path_get_filename(p: string) -> string { (line 64)
  • proc path_get_basename(p: string) -> string { (line 68)
  • proc path_get_stem(p: string) -> string { (line 72)
  • proc path_get_extension(p: string) -> string { (line 76)
  • proc path_get_directory(p: string) -> string { (line 80)
  • proc path_get_root(p: string) -> string { (line 84)

The list is intentionally capped here; the source file declares 46 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.

  1. Read space and top-level imports first so the ownership boundary of path/manipulation.vitl is explicit.
  2. Scan constants before procedures; they often encode precision, limits, or policy assumptions that explain later behavior.
  3. Read declared forms and picks before algorithms so the data vocabulary is stable in your head.
  4. Traverse procedures in source order; the early helpers usually explain the naming and numeric conventions used later.
  5. 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/path_manipulation
const ROOT: string = "src"
form PathRun {
  pattern: string,
  ready: bool
}
proc run_example() -> PathRun {
  let entries = path_new("sample")
  let ready: bool = path_selftest() == 0
  let stable: bool = ready and entries.len >= 0
  give PathRun { pattern: "src/**/*.vitl", ready: true }
}
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.

KeywordPresent in module sourceUsed in generated user example
spaceyesyes
constyesyes
formyesyes
procyesyes
letyesyes
foryesno
giveyesyes
exportyesyes
trueyesyes
andyesyes

Keywords still not exercised directly in the generated snippet: for. The page still lists them here so the gap is visible.

Source shape

space vitte/path/manipulation
// Path separator for current platform
const PATH_SEPARATOR: string = "/"
const PATH_DELIMITER: string = ":"
form Path {
    path_str: string,
    components: [string]
}
form PathManipulationManifest {
    name: string,

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.

  • Path Manipulation Module

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/path/manipulation

Path Manipulation Module

Top-level items: 47. Procedures: 40. Data surfaces: 4. Constants: 2.

First visible names: PATH_SEPARATOR, PATH_DELIMITER, Path, PathManipulationManifest, PathManipulationHealth, PathManipulationSummary, path_new, path_normalize, path_resolve, path_absolute

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

LineNameSignatureRole
8PATH_SEPARATORconst PATH_SEPARATOR: string = "/"Defines a named constant reused across the module.
9PATH_DELIMITERconst PATH_DELIMITER: string = ":"Defines a named constant reused across the module.

Data surfaces

LineNameSignatureRole
11Pathform Path {Introduces a structured data shape that other procedures can exchange.
16PathManipulationManifestform PathManipulationManifest {Introduces a structured data shape that other procedures can exchange.
23PathManipulationHealthform PathManipulationHealth {Introduces a structured data shape that other procedures can exchange.
30PathManipulationSummaryform PathManipulationSummary {Introduces a structured data shape that other procedures can exchange.

Procedures

LineNameSignatureRole
36path_newproc path_new(p: string) -> Path {Owns path semantics, traversal, or normalization.
43path_normalizeproc path_normalize(p: string) -> string {Owns path semantics, traversal, or normalization.
47path_resolveproc path_resolve(p: string) -> string {Owns path semantics, traversal, or normalization.
51path_absoluteproc path_absolute(p: string) -> string {Owns path semantics, traversal, or normalization.
55path_relativeproc path_relative(base: string, target: string) -> string {Owns path semantics, traversal, or normalization.
60path_get_parentproc path_get_parent(p: string) -> string {Owns path semantics, traversal, or normalization.
64path_get_filenameproc path_get_filename(p: string) -> string {Owns path semantics, traversal, or normalization.
68path_get_basenameproc path_get_basename(p: string) -> string {Owns path semantics, traversal, or normalization.
72path_get_stemproc path_get_stem(p: string) -> string {Owns path semantics, traversal, or normalization.
76path_get_extensionproc path_get_extension(p: string) -> string {Owns path semantics, traversal, or normalization.
80path_get_directoryproc path_get_directory(p: string) -> string {Owns path semantics, traversal, or normalization.
84path_get_rootproc path_get_root(p: string) -> string {Owns path semantics, traversal, or normalization.
89path_joinproc path_join(base: string, component: string) -> string {Owns path semantics, traversal, or normalization.
93path_join_multiproc path_join_multi(base: string, components: [string]) -> string {Owns path semantics, traversal, or normalization.
97path_with_extensionproc path_with_extension(p: string, ext: string) -> string {Owns path semantics, traversal, or normalization.
101path_with_filenameproc path_with_filename(p: string, filename: string) -> string {Owns path semantics, traversal, or normalization.
106path_existsproc path_exists(p: string) -> int {Owns path semantics, traversal, or normalization.
110path_is_fileproc path_is_file(p: string) -> int {Owns path semantics, traversal, or normalization.
114path_is_dirproc path_is_dir(p: string) -> int {Owns path semantics, traversal, or normalization.
118path_is_symlinkproc path_is_symlink(p: string) -> int {Owns path semantics, traversal, or normalization.
122path_is_absoluteproc path_is_absolute(p: string) -> int {Owns path semantics, traversal, or normalization.
126path_is_relativeproc path_is_relative(p: string) -> int {Owns path semantics, traversal, or normalization.
130path_is_hiddenproc path_is_hidden(p: string) -> int {Owns path semantics, traversal, or normalization.
135path_equalsproc path_equals(p1: string, p2: string) -> int {Owns path semantics, traversal, or normalization.
139path_starts_withproc path_starts_with(p: string, prefix: string) -> int {Owns path semantics, traversal, or normalization.
143path_ends_withproc path_ends_with(p: string, suffix: string) -> int {Owns path semantics, traversal, or normalization.
148path_cleanproc path_clean(p: string) -> string {Owns path semantics, traversal, or normalization.
152path_canonicalizeproc path_canonicalize(p: string) -> string {Owns path semantics, traversal, or normalization.
156path_simplifyproc path_simplify(p: string) -> string {Owns path semantics, traversal, or normalization.
160path_expand_homeproc path_expand_home(p: string) -> string {Owns path semantics, traversal, or normalization.
164path_expand_envproc path_expand_env(p: string) -> string {Owns path semantics, traversal, or normalization.
168path_versionproc path_version() -> string {Owns path semantics, traversal, or normalization.
172path_readyproc path_ready() -> bool {Owns path semantics, traversal, or normalization.
176manipulation_versionproc manipulation_version() -> string {Represents one top-level surface in the file contract and should be read as part of the module boundary.
180manipulation_readyproc manipulation_ready() -> bool {Represents one top-level surface in the file contract and should be read as part of the module boundary.
184manipulation_manifestproc manipulation_manifest() -> PathManipulationManifest {Represents one top-level surface in the file contract and should be read as part of the module boundary.
193manipulation_healthproc manipulation_health() -> PathManipulationHealth {Represents one top-level surface in the file contract and should be read as part of the module boundary.
202manipulation_summaryproc manipulation_summary() -> PathManipulationSummary {Represents one top-level surface in the file contract and should be read as part of the module boundary.
209path_reportproc path_report(p: string) -> Path {Owns path semantics, traversal, or normalization.
213path_selftestproc path_selftest() -> bool {Owns path semantics, traversal, or normalization.

Exports

LineNameSignatureRole
222*export *Re-exports surfaces that the module wants to expose as part of its public boundary.

Integration boundaries

Within path, 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: Path manipulation, special locations, walkers, and globbing.
  • Family architecture role: Use `path` when the program needs path semantics, traversal, or normalization. Keep it distinct from file contents and from business validation.

Composition guidance

Choose this module when

  • Choose path/manipulation.vitl when the main question is owned by this module rather than by transport, storage, orchestration, or user-interface code.
  • A project root can be normalized before any file is read.
  • A walker can enumerate source files while parsing and diagnostics remain elsewhere.

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 path.
  • Check nearby modules such as path/globbing.vitl, path/special.vitl, path/walker.vitl before 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.

NeighborProceduresData surfacesWhy compare it
path/globbing.vitl113Shares the same family boundary but carries a distinct slice of responsibility.
path/special.vitl193Shares the same family boundary but carries a distinct slice of responsibility.
path/walker.vitl114Shares the same family boundary but carries a distinct slice of responsibility.
path.vitl796Shares the same family boundary but carries a distinct slice of responsibility.

Neighbor modules