cf.pathjoin¶
-
cf.
pathjoin
(path1, path2)[source]¶ Join two file path components intelligently.
If either of the paths is a URL then a URL will be returned
See also
Parameters: Returns: - out:
str
The joined paths.
Examples: >>> cf.pathjoin('/data/archive', '../archive/file.nc') '/data/archive/../archive/file.nc' >>> cf.pathjoin('/data/archive', '../archive/file.nc') '/data/archive/../archive/file.nc' >>> cf.abspath(cf.pathjoin('/data/', 'archive/') '/data/archive' >>> cf.pathjoin('http://data', 'archive/file.nc') 'http://data/archive/file.nc'
- out: