LocalFile

Top  Previous  Next

LocalFile is used to present the end user with a specific file or list of files located on their local computer, or network server.

 

This type of request is accompanied by a list of local file paths to search, and a list of "specs" or file masks.  For example, a request might look like this:
 

<pdroot>

  <cmLocalViewer>

    <Command>LocalFile</Command>

    <LocalFile>

      <Paths>

        <Path>\\FileServer1\CrashData</Path>

        <Path>\\FileServer1\Supplemental</Path>

      </Paths>

      <Specs>

        <Spec>*.pdf</Spec>

        <Spec>*.jpg</Spec>

      </Specs>

    </LocalFile>

  </cmLocalViewer>

</pdroot>

 

Such a file is requesting that cmLocalViewer look in two folders (CrashData and Supplemental) for any files with the pdf or jpg extension.  This is awfully general and would result in the user being presented with a long list of files to choose from.  A more likely request would look like this:
 

<pdroot>

  <cmLocalViewer>

    <Command>LocalFile</Command>

    <LocalFile>

      <Paths>

        <Path>\\FileServer1\CrashData</Path>

      </Paths>

      <Specs>

        <Spec>20140702001.pdf</Spec>

      </Specs>

    </LocalFile>

  </cmLocalViewer>

</pdroot>

 
In this case, a specific file is being requested.  If that file exists in the specified path, it will be opened directly without any additional user interaction.