bool isHiddenFile(File file) { final path = p.normalize(file.path); return p.basename(path).startsWith('.') || p.split(path).any((segment) => segment.startsWith('.')); }