Get file path without file name from this
static String filePath(String path) => path.removeLast(path.fileName.length);