~bzr-pqm/bzr/bzr.dev

« back to all changes in this revision

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

  • Committer: John Arbash Meinel
  • Date: 2006-06-10 14:53:51 UTC
  • mto: (1711.7.2 win32)
  • mto: This revision was merged to the branch mainline in revision 1796.
  • Revision ID: john@arbash-meinel.com-20060610145351-9da0c1f8ba8a57e0
the _posix_* routines should use posixpath not os.path, so tests pass on win32

Show diffs side-by-side

added added

removed removed

Lines of Context:
1
1
The Transport API in bzrlib provides URL based access to network resources.
2
2
 
3
3
   >>> import os
4
 
   >>> import sys
5
4
   >>> from bzrlib.osutils import getcwd, dirname
6
5
   >>> from bzrlib.urlutils import local_path_from_url
7
6
   >>> import bzrlib.transport as transport
8
 
   >>> if sys.platform == 'win32':
9
 
   ...     root = transport.get_transport_from_url('file:///C:/')
10
 
   ... else:
11
 
   ...     root = transport.get_transport_from_url('file:///')
 
7
   >>> root = transport.get_transport("file:///")
12
8
   >>>
13
9
 
14
10
Each Transport instance represents a single logical directory.
15
11
 
16
 
   >>> dir = transport.get_transport_from_path(".")
 
12
   >>> dir = transport.get_transport(".")
17
13
   >>> local_path_from_url(dir.base) == getcwd() + '/'
18
14
   True
19
15