dictIO.dict_writer¶
DictWriter class for writing dictionaries in dictIO native file format, as well as JSON and XML.
Functions
|
Create a well defined target file name. |
Classes
Writer for dictionaries in dictIO native file format, as well as JSON, XML and OpenFoam. |
- dictIO.dict_writer.create_target_file_name(source_file: str | PathLike[str], prefix: str | None = None, scope: MutableSequence[Any] | None = None, output: str | None = None) Path ¶
Create a well defined target file name.
Helper function to create a target file name based on the source file name, a prefix, a scope and an output format.
- Parameters:
source_file (Union[str, os.PathLike[str]]) – source dict file
prefix (Union[str, None], optional) – prefix to be used, by default None
scope (MutableSequence[Any] | None, optional) – scope to be reflected in the target file name, by default None
output (Union[str, None], optional) – format of the target dict file. Choices are ‘cpp’, ‘foam’, ‘xml’ and ‘json’, by default None
- Returns:
target dict file name
- Return type:
Path