os.Path.join

The os.Path.join method is used to join two segments of the path adding the platform-dependent separator to the returning path. The syntax of the function is as follows:

 

CALL os.Path.join(begin, end) RETURNING newpath

 

where:

·         begin = a string containing the first path segment,

·         end = a string containing the last path segment,

·         newpath = a string containing the whole path joined.

 

Usage

Typically this function is called for when there is a need to construct a path with no system-specific code using the correct path separator:

 

CALL os.Path.join(os.Path.homedir(),file_ name) RETURNING newpath