# deleteRecord method

Future<bool?> deleteRecord({

1. required String fileName,

})

Delete a temporary file

Delete a temporary file created during startRecorder(). the argument must be a file name without any path. This function is seldom used, because closeRecorder() delete automaticaly all the temporary files created.

## Example

         await myRecorder.startRecorder(toFile: 'foo'); // This is a temporary file, because no slash '/' in the argument
         await myPlayer.startPlayer(fromURI: 'foo');
         await myRecorder.deleteRecord('foo');

## See also

- closeRecorder()

## Implementation

    Future<bool?> deleteRecord({required String fileName}) async {
      _logger.d('FS:---> deleteRecord');
      await _waitOpen();
      if (_isInited != Initialized.fullyInitialized) {
        throw Exception('Recorder is not open');
      }
      var b = await FlutterSoundRecorderPlatform.instance.deleteRecord(
        this,
        fileName,
      );
      _logger.d('FS:<--- deleteRecord');
      return b;
    }