title: What does opening a file actually do?
body: <p>In all programming languages (that I use at least), you must open a file before you can read or write to it. </p>
  
  <p>But what does this open operation actually do?</p>
  
  <p>Manual pages for typical functions dont actually tell you anything other than it 'opens a file for reading/writing':</p>
  
  <p><a href="http://www.cplusplus.com/reference/cstdio/fopen/" rel="noreferrer">http://www.cplusplus.com/reference/cstdio/fopen/</a></p>
  
  <p><a href="https://docs.python.org/3/library/functions.html#open" rel="noreferrer">https://docs.python.org/3/library/functions.html#open</a></p>
  
  <p>Obviously, through usage of the function you can tell it involves creation of some kind of object which facilitates accessing a file. </p>
  
  <p>Another way of putting this would be, if I were to implement an <code>open</code> function, what would it need to do on Linux?</p>