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 - splitpath() split a full path name to its components http://www.X-Hacker.org [<<Previous Entry] [^^Up^^] [Next Entry>>] [Menu] [About The Guide]
 splitpath()         Split a full path name to its components
------------------------------------------------------------------------------
 Declaration
   file.hdr

 Syntax
   proc splitpath extern
   param const char    cPath, ;
               char(2) cDrive, ;
               char    cDirectory, ;
               char(8) cFileName, ;
               char(4) cFileExt

 Arguments
   cPath is the path name string to split.

   cDrive is the drive letter (":" character appended).

   cDirectory is the directory string (prepended and followed by a
      "\" character).

   cFileName is the file name without extension.

   cFileExt is the file name extension (prepended by a dot).

 Return
   None.

 Description
   The splitpath() function separates the components of a fully
   qualified path name.

   See the Arguments section above and the example for correct use of
   parameters.

 Example
   #define EXAMPLE_FILE
   #include example.hdr

   proc Test_splitpath
   vardef
      char cPath, cDrive, cDirectory, cFileName, cFileExt, cOptions
   enddef
   makepath( cPath, "c", "\force\bin", "force", "exe" )
   ? cPath
   splitpath( cPath, cDrive, cDirectory, cFileName, cFileExt )
   ? cDrive, cDirectory, cFileName, cFileExt
   splitcommand( cPath + " test.prg", cDrive, cDirectory, ;
      cFileName, cFileExt, cOptions )
   ? cDrive, cDirectory, cFileName, cFileExt, cOptions
   endproc

   proc main
   Test_splitpath()
   endproc

See Also: makepath() splitcommand()

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