FindFile

Demonstrates how to find files that are in a specific pci-related directory.

Remarks

This example searches for the tablet.def file in the normal $PCIHOME/etc directory location.

Note: The path to the executable that is found will be returned, or NULL if the file isn't found. The returned string becomes the responsibility of the calling code, and should be freed (where appropriate).

Default Behavior:

The default FindFile() behavior is the default searching patterns suitable in a PCI or EASI environment.

etc: The local directory, $USERHOME, $PCIGROUP/etc, $PCIHOME/etc and then $PCIMASTER are searched until the file is found. The etc class is suitable for many types of relatively small files including icons, configuration files, license files, and preference files.

pro and hlp: FindFile() will utilize the local, group and system wide search paths that apply based on the contents of the local parameter file, and the environment variable PCIHOME, and PCIMASTER.

Code

  local string TabletFile

  TabletFile = FindFile( "etc", "Tablet.def" )
  print TabletFile

Output

 c:\pci\etc\tablet.def

© PCI Geomatics Enterprises, Inc.®, 2026. All rights reserved.