How can I see if a file is a folder or not

Basically when I use readDir() how can I know if one of the children is a folder?

1 Like

readDir returns a promise which resolves to an array of objects. Each object has a property, type, which is equal to either FILE or DIRECTORY. You can use this property to determine whether each child is a file or folder. :smile:


Yeah I was just reading the docs and figured that out. Thanks!

1 Like

This topic was automatically closed 7 days after the last reply. New replies are no longer allowed.