Skip to content

Script Development / Resource Path DFF.RSRC

Resource files can be viewed and managed in the "Manage / File Tools" section. When you need to operate resource files in a script, use DFF.RSRC(...) to obtain the actual path of the resource file.

Parameter Type Required / Default Value Description
file_path str Required Relative path of the resource file

When using DFF.RESP_FILE(...), simply fill in the relative path of the resource file for the file_path parameter; there is no need to use DFF.RSRC(...) to get the actual path.

Example
1
2
3
with open(DFF.RSRC('demo/data.txt')) as f:
    # Open the file with the actual path /data/resources/demo/data.txt
    pass