xOpen method

  1. @override
XOpenResult xOpen(
  1. Sqlite3Filename path,
  2. int flags
)
override

Opens a file, returning supported flags and a file instance.

Implementation

@override
XOpenResult xOpen(Sqlite3Filename path, int flags) {
  final filePath = path.path ?? random.randomFileName(prefix: chroot);
  final result = _runInWorker(
      WorkerOperation.xOpen, NameAndInt32Flags(filePath, flags, 0, 0));

  final outFlags = result.flag0;
  final fd = result.flag1;
  return (outFlags: outFlags, file: WasmFile(this, fd));
}