File Paths and Names in Go: Difference between revisions
Jump to navigation
Jump to search
(→path) |
|||
(6 intermediate revisions by the same user not shown) | |||
Line 1: | Line 1: | ||
=Internal= | =Internal= | ||
* [[File Operations in Go#File_Paths_and_Names_in_Go|File Operations in Go]] | * [[File Operations in Go#File_Paths_and_Names_in_Go|File Operations in Go]] | ||
* [[Go_Language_Modularization#filepath|Standard Library]] | |||
=Overview= | =Overview= | ||
<code>path</code> and <code>filepath</code> are two related packages that expose functionality to manipulating forward-slash-separated paths (the <code>[[#path|path]]</code> package) and file names and filesystem paths that may include Windows-style backslashes and drive letters (the <code>[[#filepath|filepath]]</code> package). | |||
=Packages= | =Packages= | ||
==<tt>path</tt>== | ==<tt>path</tt>== | ||
Line 7: | Line 11: | ||
==<tt>filepath</tt>== | ==<tt>filepath</tt>== | ||
{{External|https://pkg.go.dev/path/filepath}} | |||
=Assembling Paths= | |||
<code>filepath.Join()</code> The function also "cleans" the path. |
Latest revision as of 22:38, 16 October 2023
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
filepath
Assembling Paths
filepath.Join()
The function also "cleans" the path.