Answers.Body: <p>In Craft 3, the <code>IOHelper</code> class has been replaced by the <a href="https://docs.craftcms.com/api/v3/craft-helpers-filehelper.html" rel="nofollow noreferrer"><code>FileHelper</code></a> class.</p>
  
  <p>The closest Craft 3 equivalent to <code>IOHelper::ensureFolderExists()</code> is </p>
  
  <pre><code>FileHelper::createDirectory($path);
  </code></pre>
  
Answers.ContentLicense: CC BY-SA 4.0
Answers.CreationDate: 2019-01-18T13:08:01.190Z
Answers.LastActivityDate: 2019-01-18T13:08:01.190Z
Answers.UserDisplayName: Mats Mikkel Rummelhoff
Body: <p>Migrating Plugins to Craft 3 starts bugging me, seems that really everything changed.
  Is there an equivalent to <code>IOHelper::ensureFolderExists</code> in Craft 3?</p>
  
Tags: <plugin-development><migration>
Title: Is there an equivalent to IOHelper::ensureFolderExists in Craft 3?
ThreadText: # Is there an equivalent to IOHelper::ensureFolderExists in Craft 3?
  
  (Asked by: username_0 on 2019-01-18)
  
  Migrating Plugins to Craft 3 starts bugging me, seems that really everything changed.
  Is there an equivalent to `IOHelper::ensureFolderExists` in Craft 3?
  
  **Tags:** plugin-development, migration
  
  
  ---
  
  ## 1 answers
  
  ### Answer by username_1 on 2019-01-18. Score: 3
  
  In Craft 3, the `IOHelper` class has been replaced by the [`FileHelper`](https://docs.craftcms.com/api/v3/craft-helpers-filehelper.html) class.
  
  The closest Craft 3 equivalent to `IOHelper::ensureFolderExists()` is
  
  ```
  FileHelper::createDirectory($path);
  
  ```
  
  
  ---
  
  