title: What does os.O_TRUNC do?
body: <p><code>func OpenFile(name string, flag int, perm FileMode) (*File, error)</code></p>
  
  <pre><code>f, err := os.OpenFile("notes.txt", os.O_RDWR|os.O_CREATE|O_TRUNC, 0755)
  </code></pre>
  
  <p>Does "O_TRUNC" empty the entire file before writing?
  What do they mean with "truncates"?</p>
  
  <p>Also, does the function <code>ioutil.WriteFile()</code> empty the entire file before writing?</p>