/stdhome

To get this branch, use:
bzr branch http://bzr.ed.am/stdhome

« back to all changes in this revision

Viewing changes to lib/stdhome/walker/walker.py

  • Committer: Tim Marston
  • Date: 2014-04-04 22:28:49 UTC
  • Revision ID: tim@ed.am-20140404222849-32apy1i949qaq2na
walker now passes Walker.File objects to process(), which includes file name,
type and the type of file it points to when it's a symlink

Show diffs side-by-side

added added

removed removed

63
63
                        # it shouldn't matter.  We adding an os.pathset to the end of the
64
64
                        # filename, so it wuill only match files that are descendents of a
65
65
                        # directory with the name of this file.
66
 
                        if not recurse: skip = rel_file + os.sep
 
66
                        if not recurse: skip = rel_file + os.pathsep
67
67
 
68
68
 
69
69
        class File:
91
91
                        elif self.type == '_': return 'missing'
92
92
                        else: return 'unknown'
93
93
 
94
 
                def __str__( self ):
95
 
                        type = self.type
96
 
                        if( self.link_type ): type += '/' + self.link_type
97
 
                        return 'File( %s (%s) )' % ( self.file, type )
98
 
 
99
94
 
100
95
        @staticmethod
101
96
        def generate_walk_list( full_dir, rel_file = '' ):