Working with folders

It’s more robust to recursively read your directory structure with the directoryReader and construct your paths from directory names then bother with reading and parsing the path off the file object.

To read the directory structure you have to scan with directoryReader and distinguish between folders and files (.isDirectory/.isFile). Elm implementation just wraps the file object and actually checks if the blob is a file before wrapping it by calling isFile on it, so you can really only push it files after you cast them with .getAsFile().

1 Like