File Operations in Go: Difference between revisions

From NovaOrdis Knowledge Base
Jump to navigation Jump to search
No edit summary
Line 3: Line 3:
* [[Go Package os]]
* [[Go Package os]]
* [[Go Package ioutil]]
* [[Go Package ioutil]]
* [[Go Package io]]
* [[File_Paths_and_Names_in_Go#path|Go Package path]]
* [[File_Paths_and_Names_in_Go#path|Go Package path]]
* [[File_Paths_and_Names_in_Go#filepath|Go Package filepath]]
* [[File_Paths_and_Names_in_Go#filepath|Go Package filepath]]

Revision as of 23:54, 18 December 2023

Internal

Overview

The os package provides practical file access functions. Basic file read and write, by reading or writing the entire file into and from memory, is also provided by the ioutil package, but its ioutil.ReadFile and ioutil.WriteFile are deprecated since Go 1.16.

File paths and names should be manipulated with the functions exposed by the path and filepath packages, explained here:

File Paths and Names in Go