~bzr-pqm/bzr/bzr.dev

« back to all changes in this revision

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

  • Committer: Martin Pool
  • Date: 2005-05-11 01:03:22 UTC
  • Revision ID: mbp@sourcefrog.net-20050511010322-54654b917bbce05f
- Notes on library dependencies

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