~bzr-pqm/bzr/bzr.dev

« back to all changes in this revision

Viewing changes to bzrlib/osutils.py

  • Committer: Martin Pool
  • Date: 2005-05-12 02:14:35 UTC
  • Revision ID: mbp@sourcefrog.net-20050512021435-87fa19f051842647
- new helper function kind_marker()

Show diffs side-by-side

added added

removed removed

Lines of Context:
56
56
    elif S_ISLNK(mode):
57
57
        return 'symlink'
58
58
    else:
59
 
        raise BzrError("can't handle file kind with mode %o of %r" % (mode, f)) 
 
59
        raise BzrError("can't handle file kind with mode %o of %r" % (mode, f))
 
60
 
 
61
 
 
62
def kind_marker(kind):
 
63
    if kind == 'file':
 
64
        return ''
 
65
    elif kind == 'directory':
 
66
        return '/'
 
67
    elif kind == 'symlink':
 
68
        return '@'
 
69
    else:
 
70
        raise BzrError('invalid file kind %r' % kind)
60
71
 
61
72
 
62
73