1530.2.1
by Robert Collins
Start tests for api usage. |
1 |
The Transport API in bzrlib provides URL based access to network resources. |
2 |
||
3 |
>>> import os |
|
4 |
>>> import bzrlib.transport as transport |
|
5 |
>>> root = transport.get_transport("file:///") |
|
6 |
>>> |
|
7 |
||
8 |
Each Transport instance represents a single logical directory. |
|
9 |
||
10 |
>>> dir = transport.get_transport(".") |
|
1530.2.3
by Robert Collins
Update for integration transport apis. |
11 |
>>> dir.base == os.getcwdu() + '/' |
1530.2.1
by Robert Collins
Start tests for api usage. |
12 |
True |
13 |
||
14 |
You can change directories via the clone method: |
|
15 |
||
16 |
>>> parent = dir.clone('..') |
|
1530.2.3
by Robert Collins
Update for integration transport apis. |
17 |
>>> parent.base == os.path.dirname(os.getcwdu()) + '/' |
1530.2.1
by Robert Collins
Start tests for api usage. |
18 |
True |