title: How to only show a list of the folder in elfinder (a jquery file manager plugin)
body: <p>I am working on the file manager plugin:</p>
  
  <p><a href="http://studio-42.github.io/elFinder/#elf_l1_Lw" rel="nofollow">http://studio-42.github.io/elFinder/#elf_l1_Lw</a></p>
  
  <p>In the root folder , user can share the folder to the others, however, if the folder is not share, others should not see it.</p>
  
  <p>In the tutorial , I can hide the folder base on the folder name pattern</p>
  
  <p><a href="https://github.com/Studio-42/elFinder/wiki/Simple-file-permissions-control" rel="nofollow">https://github.com/Studio-42/elFinder/wiki/Simple-file-permissions-control</a></p>
  
  <pre><code>&lt;?php
  array(
      'driver' =&gt; 'LocalFileSystem', // driver for accessing file system (REQUIRED)
      'path'   =&gt; 'path/to/files',   // path to files (REQUIRED)
      'attributes' =&gt; array(
          array(
              'pattern' =&gt; '/^TEST$/', //You can also set permissions for file types by adding, for example, .jpg inside pattern.
              'hidden'    =&gt; true
          )
      )
  ),
  </code></pre>
  
  <p>However , the problem are:</p>
  
  <p>1) how to restrict the rule to a list of folder instead of pattern? e,g, I will store the file name at the database for the share information, the user will get a list of allow , readable folder</p>
  
  <p>2) how to restrict the rule to folder only (not file) , and only the root folder?</p>
  
  <p>Thanks a lot for helping.</p>