profiles method

List<String> profiles({
  1. required String profileFile,
})

Implementation

List<String> profiles({required String profileFile}) {
  if (!Directory(historyDir!).existsSync()) {
    print('$name browser is not installed');
    return [];
  }

  if (!profileSupport) return ['.'];

  List<String> profileDirs = [];

  var files = Directory(historyDir!).listSync(recursive: true);

  for (var item in files) {
    if (basename(item.path) == profileFile) {
      profileDirs.add(basename(item.parent.path));
    }
  }
  return profileDirs;
}