@@ -211,6 +211,36 @@ def add_file_path(self, filepath, key="", is_domain: bool = False, domain_id=0):
211211 else :
212212 self ._api .data_sources_add_file_path_with_key_utf8 (self , str (filepath ), key )
213213
214+ def add_domain_file_path (self , filepath , key , domain_id ):
215+ """Add a file path to the data sources.
216+
217+ Files not added as result files are accessory files, which contain accessory
218+ information not present in the result files.
219+
220+ Parameters
221+ ----------
222+ filepath:
223+ Path of the file.
224+ key:
225+ Extension of the file, which is used as a key for choosing the correct
226+ plugin when a result is requested by an operator.
227+ domain_id:
228+ Domain ID for the distributed files.
229+ Examples
230+ --------
231+ >>> from ansys.dpf import core as dpf
232+ >>> data_sources = dpf.DataSources()
233+ >>> data_sources.add_domain_file_path('/tmp/ds.dat', "dat", 1)
234+
235+ """
236+ # The filename needs to be a fully qualified file name
237+ if not os .path .dirname (filepath ):
238+ # append local path
239+ filepath = os .path .join (os .getcwd (), os .path .basename (filepath ))
240+ self ._api .data_sources_add_domain_file_path_with_key_utf8 (
241+ self , str (filepath ), key , domain_id
242+ )
243+
214244 def add_file_path_for_specified_result (self , filepath , key = "" , result_key = "" ):
215245 """Add a file path for a specified result file key to the data sources.
216246
0 commit comments