Retro video games delivered to your door every month!
Click above to get retro games delivered to your door ever month!
X-Hacker.org- Force 4.0 Reference - pathof() return the full pathname of a file name http://www.X-Hacker.org [<<Previous Entry] [^^Up^^] [Next Entry>>] [Menu] [About The Guide]
 pathof()            Return the full pathname of a file name
------------------------------------------------------------------------------
 Declaration
   file.hdr

 Syntax
   func char pathof extern
   param const char cPaths, ;
         const char cFileName

 Arguments
   cPaths is a list of path names in a format similar to the DOS path
   statement.

   cFileName is the name of the searched file without drive or path
   names.

 Return
   The full pathname where the file could be found, or a null string if
   the lookup failed.

 Description
   This function is similar to exist(), but it searches through all
   components of the supplied path list, instead of checking for the file
   in just one directory.

 Example
   #define EXAMPLE_FILE
   #include example.hdr

   proc Test_pathof
   vardef
      char cPath
   enddef
   // check if force.exe is on the path
   cPath := pathof( getenv( "path" ), "force.exe" )
   if .not. isempty( cPath )
      ? "Compiler is found in", cPath
   endif
   endproc

   proc main
   Test_pathof()
   endproc

See Also: exist()

Online resources provided by: http://www.X-Hacker.org --- NG 2 HTML conversion by Dave Pearson