HB_DirTemp

HB_DirTemp

Returns name of temp dir of system / user, with closing backslash

Syntax

      HB_DirTemp() -> <SysTempDirName>

Argument

None

Result

<SysTempDirName> : name of temp dir of system / user

Description

HB_DirTemp() is an environment function to obtain name of temp dir of system / user.

This info can be get by SET TEMP command in cmd box and by GETE() function also (see example).

Note that Harbour add a dir-separator (backslash for Windows) to end of <SysTempDirName>.

In Windows, this is : C:\Users\<CurrentUser>\AppData\Local\Temp

Example

      ? HB_DirTemp()
      ? GETE( 'TEMP' )

Seealso

GETE(), GETENV(), HB_GetEnv()

hb_GetEnv()

HB_GETENV()

Obtains a system environmental setting.

Syntax

      HB_GETENV(<cEnviroment>, [<cDefaultValue>], [<lApplyCodepage>] )
                   --> <cReturn>

Arguments

<cEnviroment> Enviromental variable to obtain.

<cDefaultValue> Optional value to return if <cEnvironment> is not found.

<lApplyCodepage> optional logical parameter specifing whether to apply automatic codepage conversion (to the codepage specified by Set( _SET_OSCODEPAGE ) on the obtained value. The default is .T. Note that if the default value is passed and the environment value is not found, this codepage conversion is not performed against the returned default value

Returns

<cReturn> Value of the environment variable or <cDefaultValue> or an empty string.

Description

This function yields a string that is the value of the environment variable <cEnviroment>, which is stored at the system level.

If no environment variable can be found, the value of the function will be <cDefaultValue> if it is passed, else an empty string.

Examples

      ? HB_GETENV( "PATH" )
      ? HB_GETENV( "CONFIG" )
      ? HB_GETENV( "HARBOURCMD", "-n -l -es2" )

Compliance

Harbour

Platforms

All

Files

src/rtl/gete.c Library is rtl

Seealso

GETENV, GETE

GetEnv()

Template

Function

Name

GetEnv()

Category

API

Subcategory

Environment

Oneliner

Obtains a system environmental setting.

Syntax

      GetEnv( <cEnviroment> )  --> <cReturn>

Arguments

<cEnviroment> Enviromental variable to obtain.

Returns

<cReturn> Value of the Environment Variable.

Description

This function yields a string that is the value of the environment variable <cEnviroment>, which is stored at the system level.

If no environment variable is found, an empty string is returned.

Examples

      ? GetEnv( "PATH" )
      ? GetEnv( "CONFIG" )
      ? GetEnv( "HARBOURCMD",  "-n -l -es2" )

Compliance

Clipper

Platforms

All

Files

Library is core

Seealso

GetE()

GetE()

GETE()

Obtains a system environmental setting.

Syntax

      GETE(<cEnviroment> )  --> <cReturn>

Arguments

<cEnviroment> Enviromental variable to obtain.

Returns

<cReturn> Value of the Environment Variable.

Description

This function yields a string that is the value of the environment variable <cEnviroment>, which is stored at the system level.

If no environment variable is found, an empty string is returned.

Examples

      ? GETE( "PATH" )
      ? GETE( "CONFIG" )
      ? GETE( "HARBOURCMD", "-n -l -es2" )

Compliance

This is CA-Cl*pper compliant.

The <cDefaultValue> parameter is a Harbour extension.

Platforms

All

Files

src/rtl/gete.c Library is rtl

Seealso

GETENV