String stripLeadingSlashes(String path) { while (path.startsWith('/')) { path = path.substring(1); } return path; }