Skip to content

Improved handling of read-only ZGY files.

Paal Kvamme requested to merge kvamme62/auto-read-only-flag into master

See the "Read only ZGY files" section in doc/implementation.html for details.

In short: Three additional settings have been added to the IOContext.

  • setRoAfterWrite: Set the ZGY file to read-only when done writing it. Defaults to on. Most applications will want to leave this on because most applications do not expect to update ZGY files in place.

  • forceRoBeforeRead: Sneak past the mandatory locking in SDAPI by forcing the read-only flag to true on the ZGY file, if needed, on each open for read.

  • forceRwBeforeWrite: Dangerous option. Sneak past the mandatory locking in SDAPI by forcing the read-only flag to false on the ZGY file, if needed, that is about to be opened for update.

Files created by the old ZGY-Cloud library will still be left writable. This means that altUrl will not work for those, unless forceRoBeforeRead is in effect.

Merge request reports