<p>Check /vendor/craftcms/cms/src/models/FolderCriteria.php Class for reference. I guess most of craft's documentation lies in code.</p>

<p>Or you can visit <a href="https://docs.craftcms.com/api/v3/craft-models-foldercriteria.html" rel="nofollow noreferrer">https://docs.craftcms.com/api/v3/craft-models-foldercriteria.html</a>
which is the same thing.</p>

<p>check table "yourprefix_volumefolders" for data type of FolderCriteria.</p>

CC BY-SA 4.0
2019-07-18T16:21:12.083Z
Thank you very much, this document is I have been looking for.
Kota.M
CC BY-SA 4.0
2019-07-18T03:58:13.737Z
2019-07-18T03:58:13.737Z
Parry Huang
<p>In my plugin, I would like to search a folder.
However, I cannot find any information about the criteria for folders.
Are there any documentation or something?</p>

<pre><code>$n = Craft::$app-&gt;assets-&gt;findFolder(array(
    'name' =&gt; $folder,
    'parent' =&gt; $p_folder
));
</code></pre>

<p>My code is like this. Folder name is not unique, so I have to also use its parent.
However, I do not know how to include parent folder in the criteria. "Parent" is not correct.</p>

<plugin-development><craft3><assets>
Craft criteria for asset folders
# Craft criteria for asset folders

(Asked by: username_0 on 2019-07-17)

In my plugin, I would like to search a folder.
However, I cannot find any information about the criteria for folders.
Are there any documentation or something?
$n = Craft::$app->assets->findFolder(array(
    'name' => $folder,
    'parent' => $p_folder
));

My code is like this. Folder name is not unique, so I have to also use its parent.
However, I do not know how to include parent folder in the criteria. "Parent" is not correct.

**Tags:** plugin-development, craft3, assets


---

## 1 answers

### Answer by username_1 on 2019-07-18. Score: 1 | Accepted answer

Check /vendor/craftcms/cms/src/models/FolderCriteria.php Class for reference. I guess most of craft's documentation lies in code.

Or you can visit <https://docs.craftcms.com/api/v3/craft-models-foldercriteria.html>
which is the same thing.

check table "yourprefix\_volumefolders" for data type of FolderCriteria.

> **Comments:**
> **username_0**: Thank you very much, this document is I have been looking for.  

---

