xHarbour Reference Documentation > Function Reference |
Returns the operating specific drive separator character.
HB_OsDriveSeparator() --> cDriveSeparator
The function returns a character used as drive separator.
See also: | HB_OsNewLine(), HB_OsPathDelimiters(), HB_OsPathListSeparator(), HB_OsPathSeparator() |
Category: | Disks and Drives , Environment functions , xHarbour extensions |
Source: | rtl\philes.c |
LIB: | xhb.lib |
DLL: | xhbdll.dll |
// The example shows an operating system independent way of // obtaining a fully qualified file name from a simple file name. PROCEDURE Main LOCAL cFile := "Test.prg" ? FullFileName( cFile ) RETURN FUNCTION FullFileName( cFileName ) LOCAL cPath := CurDrive() LOCAL cDelim:= IIF( "\" $ HB_OsPathDelimiters(), "\", "/" ) cPath += HB_OsDriveSeparator() cPath += cDelim + CurDir() + cDelim RETURN cPath + cFileName
http://www.xHarbour.com