Skip to content

Script Development / Resource Path DFF.RSRC

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

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

When using DFF.RESP_FILE(...), the file_path parameter can directly fill in the relative path of the resource file, and there is no need to use DFF.RSRC(...) to get the real path

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