I've made a method that checks 2 strings passed into itself that see's if a root folder and subfolder within it exists and if they don't, create them.
It's easy enough and it works well but my only issue is when I want to check for a root folder only it returns and error since one of the strings is empty.
Is there a smart way of checking for a path like "/data" , "/data/files" or "/data/files/morefiles" to see if all folders exists and if not, create the missing ones? 
 
     
     
     
     
     
    