deleteDocument function

Future<void> deleteDocument(
  1. String path, {
  2. String? app,
})

Deletes path.

Implementation

Future<void> deleteDocument(String path, {String? app}) {
  final p = path.toNativeUtf8();
  return _awaitOutcome(
    (port) => _onApp(app, (a) => fdbFsDelete(a, p.cast(), port)),
    'delete $path',
  ).whenComplete(() => calloc.free(p));
}