deleteByPath method

Future<void> deleteByPath(
  1. String path
)

Deletes the file at the specified path.

Returns a Future that completes once the file is deleted.

Implementation

Future<void> deleteByPath(String path) async {
  final file = File(path);
  if (await file.exists()) {
    await file.delete();
  }
}