fileLocate

C Styled Script
Reference Manual

<< Back  End  Next >>
 
 
INDEX
Introduction
Installation
Using The CSS Executive
Language
Directives
System Library
String Library
Regular Expression Lib.
File Library
   fileClose
   fileCopy
   fileDelete
   fileDelDir
   fileEof
   fileFlush
   fileInfo
   fileLocate
   fileMakeDir
   fileOpen
   fileRead
   fileReadLine
   fileReadPos
   fileRename
   fileTempName
   fileWrite
   fileWriteLine
   fileWritePos
Database Library
C API
C++ API
CSS Links
  
fileLocate(
  const filename,  // name of file to search
  const varname)   // environment variable with path's

Searches a file in all directories listed in a specific environment variable as PATH, INCLUDE, LIB ond so on. Returns fully qualified pathname of found file. If file is not found an empty string is returned.

Example:

var zip = fileLocate('pkunzip2.exe', 'path');
if (zip == '') throw 'pkunzip2.exe not found';
sysLog('zip = '|zip); // 'zip = f:\ibk\pbin\pkunzip2.exe'
 Copyright © IBK LandquartLast revised by Peter Koch, 24.02.00<< Back  Top  Next >>