title: Serving file from secure location with Symfony
body: <p>I would like to load my own <strong>sensitive</strong> file from a service with Symfony.
  I'm a little confused with all the stuff found in the Symfony documentation.
  By default, I can access only on file placed in my <code>/web</code> folder.  </p>
  
  <p>But if I'm right, this folder is public. So i want to move my file to <code>/src/AppBundle/Resources/myfile.txt</code>  </p>
  
  <p>Here are several links I've read without finding anything clear.  </p>
  
  <ul>
  <li><a href="http://symfony.com/doc/current/components/config/resources.html" rel="nofollow noreferrer">http://symfony.com/doc/current/components/config/resources.html</a>  </li>
  <li><a href="http://symfony.com/doc/current/components/finder.html" rel="nofollow noreferrer">http://symfony.com/doc/current/components/finder.html</a>  </li>
  <li><a href="http://symfony.com/doc/current/cookbook/configuration/override_dir_structure.html" rel="nofollow noreferrer">http://symfony.com/doc/current/cookbook/configuration/override_dir_structure.html</a>  </li>
  <li><a href="https://stackoverflow.com/questions/12933993/symfony2-access-files-in-folder-outside-web">Symfony2 : access files in folder outside web</a>  </li>
  </ul>
  
  <p>Should I use the <code>__DIR__</code> statement?</p>
  
  <p>I've 2 goals to achieve if possible:  </p>
  
  <ul>
  <li>Access a file with a relative path to the project (e.g AppBundle or 'www' folder)</li>
  <li>Access files in <code>/random/place/on/my/server</code> without exposing the entire the path.  </li>
  </ul>
  
  <p>One last thing to add; There is no way to copy my files in the web folder, there is more than 10Gb of files to access, so no cache, no copy, just a simple acces.</p>