removeDbFiles static method
Danger zone! This will delete all files in the given directory!
If an in-memory database identifier is given (using inMemoryPrefix), this will just clean up the in-memory database.
No Store may be alive using the given directoryPath
. This means this
should be called before creating a store.
For Flutter apps, the default directoryPath
can be obtained with
(await defaultStoreDirectory()).path
from objectbox_flutter_libs
(or objectbox_sync_flutter_libs
).
For Dart Native apps, pass null to use the defaultDirectoryPath.
Implementation
static void removeDbFiles(String? directoryPath) {
final path = _safeDirectoryPath(directoryPath);
checkObx(withNativeString(path, C.remove_db_files));
}