bool isHidden(String path, String rootPath) { // Strip rootPath final rootRelative = path.replaceFirst(rootPath, ''); return reg.hasMatch(rootRelative); }