Skip to content

ZipStore arguments: 'w' vs 'x' #1057

@aliaksei-chareshneu

Description

@aliaksei-chareshneu

Dear all,

Could you tell me what is the exact difference between 'w' and 'x' mode for ZipStore creation?
Also, what does it mean "truncate" here?

modestring, optional

One of ‘r’ to read an existing file, ‘w’ to truncate and write a new file, ‘a’ to append to an existing file, or ‘x’ to exclusively create and write a new file.

Two related questions:

  • How dimension_separator would affect reading/writing arrays?
  • Does the store need to be closed after reading data from it if opened in 'r' (reading mode)?

https://zarr.readthedocs.io/en/stable/api/storage.html#zarr.storage.ZipStore

Best regards,
Aliaksei

  • Value of zarr.__version__: 2.10.3
  • Value of numcodecs.__version__: 0.9.1
  • Version of Python interpreter: 3.9.0
  • Operating system (Linux/Windows/Mac): Windows 11
  • How Zarr was installed (e.g., "using pip into virtual environment", or "using conda"): using pip into virtual environment

Metadata

Metadata

Assignees

No one assigned

    Labels

    documentationImprovements to the documentation

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions