title: Error Trying to fsync a Directory
body: <p>I'm trying to <code>fsync</code> a directory, to ensure that rename operation occurs. The problem that I'm having is that Python keeps returning a permission error, even though I have full permissions for the various folders I've tried this on.</p>
  
  <pre><code>directory = r'C:\Random\Path'
  os.access(directory, os.W_OK)
  os.access(directory, os.X_OK)
  os.access(directory, os.R_OK)
  True, True, True
  
  fd = open(directory)
  os.fsync(fd)
  IOError: [Errno 13] Permission denied: 'C:\\Random\\Path'
  </code></pre>
  
  <p>Am I doing something wrong, or is there something deeper going on?</p>