Skip Navigation

Accessing Additional Files in Sabre Scribe Plug-ins

This scenario is optional. Add this functionality when you want to do any of the following:

  • Your Sabre Scribe scripts read to or write from files in your plug-in.

  • You want to publish a new version of a Sabre Scribescripts plug-in in which you have updated these files.

Add the com.sabre.edge.redapp.pluginresources extension point to define the paths of the files within the plug-in.

        If this is a new plug-in with files that your script will access, you can set override to false.

        If you want to override existing files, add the override parameter with the new file.

   <extension point="com.sabre.edge.redapp.pluginresources">
         <files>
            <file override="true" path="sample.txt" />
         </files>
   </extension>
Note
A warning occurs if you are using multiple files in the`files`element in the com.sabre.edge.redapp.pluginresources extension point. Ignore the warning as a workaround. The functionality is not affected.
  1. Use the ${plugin_resources} variable to allow access to files within the plug-in.

        ${plugin_resources} points to the working directory of the plug-in, for example, the plug-in is in the workspace in \.metadata\.plugins\com.sabre.redapp.example.scribe.

        All commands that use the FILE or F directive can use ${plugin_resources}, as their path.

READ FILE="${plugin_resources}/sample.txt" R=0 C=0 [variable_name], "\n"

  1. Add these files and scripts to build.properties in the plug-in.