xHarbour Reference Documentation > Function Reference |
Composes a file name from individual components.
HB_FNameMerge( [<cPath>] , ; [<cFileName>] , ; [<cExtension>] ) --> cResult
The function returns a character string containing all components passed to the function. When no parameter is passed, an empty string ("") is returned.
Function HB_FNameMerge() is used to build a full qualified file name from individual components. They can be obtained by calling HB_FNameSplit().
See also: | CurDir(), CurDrive(), Directory(), File(), HB_FNameSplit() |
Category: | Character functions , File functions , xHarbour extensions |
Source: | rtl\fnsplit.c |
LIB: | xhb.lib |
DLL: | xhbdll.dll |
// The function splits a full qualified file name and // merges different components PROCEDURE Main LOCAL cString := "C:\xhb\source\data\test.dbf" LOCAL cPath, cFileName, cExtension HB_FNameSplit( cString, @cPath, @cFileName, @cExtension ) ? HB_FNameMerge( , cFileName, cExtension ) // result: test.dbf ? HB_FNameMerge( cPath, cFileName ) // result: C:\xhb\source\data\test RETURN
http://www.xHarbour.com