closeFor static method

Future<void> closeFor(
  1. String storagePath
)

Closes and forgets the instance owning storagePath, if there is one.

Note this keys on a storage PATH, unlike the same-named AtPersistenceFactory.closeFor, which keys on an atSign. Close BEFORE deleting the directory, not after: a path whose directory has already been removed can only be matched lexically, which will not find an instance filed under its resolved location. closeAll is immune, since it works from the keys already in the map.

Implementation

static Future<void> closeFor(String storagePath) =>
    _closeKey(canonicalPathFor(storagePath, create: false));