| Trees | Index | Help |
|
|---|
|
|
|
|||
|
pathjoin(base,
*paths)
Join paths to a base, observing pardir. |
|||
|
nativejoin(base,
path)
Joins two paths - returning a native file path. |
|||
|
relpathto(thisdir,
origin,
dest)
Given two paths relative to a directory, work out a path from origin to destination. |
|||
|
relpath(origin,
dest)
Given two absolute paths, work out a path from origin to destination. |
|||
|
tslash(apath)
Add a trailing slash to a path if it needs one. |
|||
| testJoin() | |||
| testRelpathto() | |||
| testRelpathto2() | |||
| testRelpath() | |||
Imports: posixpath, os, urllib.url2pathname, urllib.pathname2url
|
|||
Join paths to a base, observing pardir.
|
Joins two paths - returning a native file path. Given a base path and a relative location, (in posix format) return a file path in a (relatively) OS native way. |
Given two paths relative to a directory, work out a path from origin to destination. Assumes UNIX/URL type relative paths. If origin doesn't end with '/' we assume it's a file rather than a directory.
|
Given two absolute paths, work out a path from origin to destination. Assumes UNIX/URL type relative paths. If origin doesn't end with '/' we assume it's a file rather than a directory.
If origin or dest don't start with '/' then we add it.
|
Add a trailing slash to a path if it needs one. Doesn't use os.sep because you end up jiggered on windoze - when you want separators for URLs. |
|
|
|
|
| Trees | Index | Help |
|
|---|
| Generated by Epydoc 3.0alpha2 on Sat Apr 29 11:03:35 2006 | http://epydoc.sf.net |