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 on resource files within a script, you must use DFF.RSRC(...) to obtain 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(...), directly fill in the relative path of the resource file for the file_path parameter. There is no need to use DFF.RSRC(...) to obtain the real path.

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