HB_PathNormalize

HB_PathNormalize

Normalizes the path designation by converting relative path to absolute

Syntax

`      HB_PathNormalize( <cRPath> ) -> <cAPath>`

Argument

<cRPath> : A path as relative ( include one or more ‘.’ and / or ‘..’ ). It is assumed that it is in accordance with OOS rules.

Returns

<cAPath> : Normalized ( absolute ) path, standardized path whenever possible.

Description

HB_PathNormalize() looks like a synonym of TrueName()

Example

```      LOCAL cDir := 'C:\temp\TestSeps'
? HB_PathNormalize( cDir + "\.." )  // C:\temp```

Seealso

HB_DirSepToOS

HB_DirSepToOS

Convert dir separators in a path to OS standard dir separators

Syntax

`      HB_DirSepToOS( <cPath1> ) -> <cPath2>`

Argument

<cPath1> : A path with any dir separator in it

Returns

<cPath2> : Converted dir separators to OS standard version of <cPath1>

Description

In paths, “dir separator” is a ‘\’ ( back slash ) for DOS / Windows and a “/” ( slash )for U*nix systems

HB_DirSepToOS() is a function to convert dir separators to OS standard

Example

```      LOCAL cDir := 'C:/temp/TestSeps'
? HB_DirSepToOS( cDir  )            // C:\temp\TestSeps```

Seealso

Add a dir separator to end of a path when its missing

Syntax

`      HB_DirSepAdd( <cPath1> ) -> <cPath2>`

Argument

<cPath1> : A path either include or not a dir separator at end

Returns

<cPath2> : Added dir separator at end version of <cPath1>

Description

In paths, “dir separator” is a ‘\’ ( back slash ) for DOS / Windows and a “/” ( slash )for U*nix systems

HB_DirSepAdd() is a function to add a dir separator to end of a path when its missing

Example

```      LOCAL cDir := 'C:\temp\TestSeps'
? HB_DirSepAdd( cDir )          // C:\temp\TestSeps\```

Seealso