title: How to remove a directory in wordpress using Filesystem_API
body: <p>I am using WordPress 4.8.1</p>
  
  <p>I am trying to remove a directory from theme setting, but neither getting any error nor any success.
  Even PHP error log has not logged data about it, My WP_DEBUG is on.</p>
  
  <pre><code>$wp_filesystem_base = WP_Filesystem_Base();
  $wp_filesystem_base-&gt;rmdir(dirname($file_path), true);
  </code></pre>
  
  <p>The class is not undefined for sure as I could have got some error, still I used a class_exists to check it and it is available where I am using.</p>
  
  <p>please let me know, if I am doing it wrong or need any thing  more about the issue.</p>