static String? getPath(String? path) { if (path != null && path.endsWith('/')) { return path.substring(0, path.length - 1); } return path; }