import 'dart:io';
import 'package:mason_logger/mason_logger.dart';

final done = lightGreen.wrap('Done');
final Logger _logger = Logger();

void writeMirrorIntoFile(String mirror, String path) {
  final file = File(path);
  final writting = lightYellow.wrap('Writting $path');
  _logger.info(writting);
  if (!file.existsSync()) file.createSync(recursive: true);
  file.writeAsStringSync(mirror);
  _logger.info(done);
}
