import 'dart:io';

import 'package:guru_utils/file/file_utils.dart';
export 'package:guru_utils/file/file_utils.dart';

extension GuruFileUtilsExtension on FileUtils {
  String get guruPath => "guru";

  String get configPath => "config";

  Future<Directory> getGuruConfigDir(String name, {bool recursive = true}) async {
    return await getAppDir(subDirs: [guruPath, configPath, name], recursive: recursive);
  }

  Future<File> getGuruConfigFile(String dirName, String name) async {
    final dir = await getGuruConfigDir(dirName);
    return File("${dir.path}/$name");
  }
}
