~bzr-pqm/bzr/bzr.dev

« back to all changes in this revision

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

  • Committer: Robert Collins
  • Date: 2006-03-06 07:14:27 UTC
  • mto: (1594.2.4 integration)
  • mto: This revision was merged to the branch mainline in revision 1596.
  • Revision ID: robertc@robertcollins.net-20060306071427-359ef15c1d891e84
Add total_size to the revision_store api.

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