title: List files in a specific folder using Flask-FlatPages
body: <p>I use Flask-FlatPages and want to list the files in a specific folder. Until now I only used one level of folders and the following route worked fine:</p>
  
  <pre><code>@app.route('/&lt;path:name&gt;')
  def articles(name):
      articles = (p for p in pages if p.path.startswith(str(name)))
      folders = listdirs(name)
      return render_template('articles.html', articles=articles, folders=folders)
  </code></pre>
  
  <p>Now I have a folder structure like this:</p>
  
  <pre><code>level1/
    level2/
      file1.md
      level3/
        file2.md
  </code></pre>
  
  <p>I get "file1.md" and "file2.md" listed when I'm at the url "/level2". But I just want to list the files in the current directory. How can I change my route to do that?</p>