/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-18 14:46:42 UTC
  • Revision ID: tim@ed.am-20140418144642-kr3vmc8fgnxgkbza
implemented symlink substitution and ignore list in status walker (and added
some verbose messages)

Show diffs side-by-side

added added

removed removed

Lines of Context:
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.pathsep
 
66
                        if not recurse: skip = rel_file + os.sep
67
67
 
68
68
 
69
69
        class File:
79
79
                        else:
80
80
                                self.type = '?'
81
81
                        if os.path.islink( self.file ):
82
 
                                self.link_type = type
 
82
                                self.link_type = self.type
83
83
                                self.type = 'l'
84
84
                        else:
85
85
                                self.link_type = False
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
 
94
99
 
95
100
        @staticmethod
96
101
        def generate_walk_list( full_dir, rel_file = '' ):