Referencing Files in a Workbook - Maple Help

Referencing Files in a Workbook

You can refer to the contents of data and Maple code files added to your workbook using Maple Workbook URIs.

 Using a Workbook URI to Refer to Workbook Files The Workbook URI (Uniform Resource Identifier) is used to represent the identity and location of files within a Maple workbook or files residing inside another workbook in a given file directory. A URI  would look like this:  $\mathrm{exampleURI}≔"this:///MyCode.mpl"$

Workbook URI Syntax

 The Basics Using the URI mentioned above as an example,  $\mathrm{exampleURI}≔"this:///MyCode.mpl"$ The substring, "this://" identifies this URI as a reference to the current open workbook. The third slash represents the root directory of the Maple workbook. Finally, "MyCode.mpl" represents the Maple code file located in the root directory of the current workbook.    In general, the URI syntax is "this:////".

Referencing Files in Another Workbook

While URIs of the form "this:///<path to file>/<filename>" are used to represent files within a workbook, it is also possible to reference files contained in other workbooks.

The syntax for such a URI is:

"maple://<file path to workbook>/<path within other workbook>/<filename>"

 Creating a Workbook URI on Windows The file separator on a Windows operating system is backslash "\". However, the backslash is also an escape character. So in order to use the backslash as a file separator, a second backslash is required. A example of a workbook URI on Windows would be: maple://C:\\foo\\bar.maple\\Images\\Image.png

 Creating a Workbook URI on Linux or Mac OS X The forward slash "/" character is the valid file separator on Linux or Mac OS X. An example of a workbook URI on Linux or Mac OS X would be: maple:///foo/bar.maple/Images/Image.png