xHarbour Reference Documentation > Function Reference xHarbour Developers Network  

HB_OsDriveSeparator()

Returns the operating specific drive separator character.

Syntax

HB_OsDriveSeparator() --> cDriveSeparator

Return

The function returns a character used as drive separator.

Info

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

Example

// 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

Copyright © 2006-2007 xHarbour.com Inc. All rights reserved.
http://www.xHarbour.com
Created by docmaker.exe