File Paths and Names in Go

From NovaOrdis Knowledge Base
Revision as of 22:38, 16 October 2023 by Ovidiu (talk | contribs) (→‎Packages)
(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)
Jump to navigation Jump to search

Internal

Overview

path and filepath are two related packages that expose functionality to manipulating forward-slash-separated paths (the path package) and file names and filesystem paths that may include Windows-style backslashes and drive letters (the filepath package).

Packages

path

https://pkg.go.dev/path

filepath

https://pkg.go.dev/path/filepath

Assembling Paths

filepath.Join() The function also "cleans" the path.