File Operations in Go: Difference between revisions

From NovaOrdis Knowledge Base
Jump to navigation Jump to search
Line 5: Line 5:


=Overview=
=Overview=
The <code>os</code> package provides actual file access functions. Basic file read and write, by reading or writing the entire file into and from memory, is also provided by the [[Go Package ioutil|<tt>ioutil</tt> package]], but its <code>[[Go Package ioutil#Overview|ioutil.ReadFile]]</code> and <code>[[Go Package ioutil#Overview|ioutil.WriteFile]]</code> are deprecated since Go 1.16.
The [[Go Package os|<tt>os</tt> 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 [[Go Package ioutil|<tt>ioutil</tt> package]], but its <code>[[Go Package ioutil#Overview|ioutil.ReadFile]]</code> and <code>[[Go Package ioutil#Overview|ioutil.WriteFile]]</code> are deprecated since Go 1.16.

Revision as of 18:41, 25 August 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.