Very many thanks to @zerogjoe for his elegant answer, which works perfectly for Databricks formatted file paths.To make this a little more robust and allow for filesystem api paths (that can be used with os, glob etc and start with "/dbfs") I've ad...