Introduce enum `FileMode` for I/O file mode
Open
good first issue
io
- Dominant language
- C++
- Stars
- 1.2k
- Forks
- 261
- Avg merge
- 1d 15h
- Merged PRs (30d)
- 65
Description
Currently the file mode in which an output file is opened is specified by a string.
```python
with XDMFFile(mesh.comm, filename, "w", encoding=encoding) as file:
file.write_mesh(mesh)
```
This should be altered to be enum based and back end independent, ref. https://github.com/FEniCS/dolfinx/pull/4177#discussion_r3608425522.
Contributor guide
Assessment
This issue has not been assessed yet.