deleteFile method

  1. @override
Future<bool> deleteFile(
  1. String path
)
override

Remove o arquivo em path quando ele existir.

Retorna true quando a remoção acontece e false quando o arquivo não existe.

Implementation

@override
Future<bool> deleteFile(String path) {
  return _runWithPathLock(path, () async {
    _extensionIncludePath(path);
    final file = File(path);
    if (await file.exists()) {
      await file.delete();
      return true;
    }
    return false;
  });
}