clearFile function

Future<void> clearFile(
  1. String filePath
)

Clears the contents of the file located at filePath.

Implementation

Future<void> clearFile(String filePath) async {
  final localSystemFilePath = toLocalSystemPathFormat(filePath);
  final file = File(localSystemFilePath);
  await file.writeAsString('');
}