~bzr-pqm/bzr/bzr.dev

« back to all changes in this revision

Viewing changes to bzrlib/doc/api/transport.txt

MergeĀ fromĀ jam-integration

Show diffs side-by-side

added added

removed removed

Lines of Context:
 
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(".")
 
11
   >>> dir.base == os.getcwdu() + '/'
 
12
   True
 
13
 
 
14
You can change directories via the clone method:
 
15
 
 
16
   >>> parent = dir.clone('..')
 
17
   >>> parent.base == os.path.dirname(os.getcwdu()) + '/'
 
18
   True