@cityjson/flatcitybuf
    Preparing search index...

    Function fromFile

    • Opens a local .fcb file for reading and returns a fully-constructed FcbReader -- its header already read and validated.

      The file handle stays open for the reader's lifetime -- later queries seek back into the indices -- so the caller owns closing it, via FcbReader.close() or await using.

      Parameters

      • path: string

        anything fs.open accepts, relative to process.cwd().

      Returns Promise<FcbReader>

      FcbError with code IoError if the path cannot be opened or stat'ed, and the header-validation errors of FcbReader.fromReader (MissingMagicBytes, IllegalHeaderSize, ...) for a file that is not a well-formed .fcb.