title: Why is there a mismatch between FileManager and Finder?
body: <p>If I print the document directory when the simulator starts, I get this:</p>
  
  <pre><code>let simulatorPath = NSSearchPathForDirectoriesInDomains(.documentDirectory, .userDomainMask, true)[0]
  print(simulatorPath)
  
  
  //prints -&gt; /Users/name/Library/Developer/CoreSimulator/Devices/[device-id]/data/Containers/Data/Application/[application-id]/Documents
  </code></pre>
  
  <p>If I open this directory with Finder, there are a few other folders there: /Library, /SystemData, and /tmp. Specifically, /Library/Caches/[domain.app]/[several cache files].</p>
  
  <p>However, in my app, I'm creating a sqlite database using the file manager. And if I do the following after creating the database:</p>
  
  <pre><code>var path = FileManager.default.currentDirectoryPath + "Library/Caches"
  
  let enumerator = FileManager.default.enumerator(atPath: path)
  while let obj = enumerator?.nextObject() as? String {
    print(obj)
  }
  </code></pre>
  
  <p>This is printed:</p>
  
  <pre><code>ColorSync
  ColorSync/com.apple.colorsync.devices
  Desktop Pictures
  Desktop Pictures/78DJQ81B-3D2C-46C7-A268-3CE1903213FE
  Desktop Pictures/78DJQ81B-3D2C-46C7-A268-3CE1903213FE/lockscreen.png
  domain.app
  domain.app/SQLite
  com.apple.cloudkit
  com.apple.cloudkit/com.apple.cloudkit.launchservices.hostnames.plist
  com.apple.iconservices.store
  app
  app/SQLite
  app/SQLite/cache.db
  </code></pre>
  
  <p>But the contents of the /Library/Caches/[domain.app] folders are different when printed with the enumerator, vs visited in Finder. Am I wrong in assuming that</p>
  
  <pre><code>NSSearchPathForDirectoriesInDomains(.documentDirectory, .userDomainMask, true)[0]
  </code></pre>
  
  <p>and </p>
  
  <pre><code>FileManager.default.currentDirectoryPath + "/Documents"
  </code></pre>
  
  <p>point to the same location?</p>