#NEWLINE# def update_files( self ) : #NEWLINE# #INDENT# ls = [ ] #NEWLINE# for ( folder , name ) in self . listFiles ( self . includeSubFolder ) : #NEWLINE# #INDENT# absname = os . path . realpath ( os . path . join ( folder , name ) ) #NEWLINE# if self . isExcluded ( absname ) : #NEWLINE# #INDENT# continue #NEWLINE# #UNINDENT# try : #NEWLINE# #INDENT# st = os . stat ( absname ) #NEWLINE# #UNINDENT# except EnvironmentError as err : #NEWLINE# #INDENT# if ( err . errno != errno . ENOENT ) : #NEWLINE# #INDENT# raise #NEWLINE# #UNINDENT# #UNINDENT# else : #NEWLINE# #INDENT# if ( not stat . S_ISREG ( st . st_mode ) ) : #NEWLINE# #INDENT# continue #NEWLINE# #UNINDENT# fid = self . get_file_id ( st ) #NEWLINE# ls . append ( ( fid , absname ) ) #NEWLINE# #UNINDENT# #UNINDENT# for ( fid , file ) in list ( self . _files_map . items ( ) ) : #NEWLINE# #INDENT# try : #NEWLINE# #INDENT# st = os . stat ( file . name ) #NEWLINE# #UNINDENT# except EnvironmentError as err : #NEWLINE# #INDENT# if ( err . errno == errno . ENOENT ) : #NEWLINE# #INDENT# self . unwatch ( file , fid ) #NEWLINE# #UNINDENT# else : #NEWLINE# #INDENT# raise #NEWLINE# #UNINDENT# #UNINDENT# else : #NEWLINE# #INDENT# if ( fid != self . get_file_id ( st ) ) : #NEWLINE# #INDENT# self . unwatch ( file , fid ) #NEWLINE# self . watch ( file . name ) #NEWLINE# #UNINDENT# #UNINDENT# #UNINDENT# for ( fid , fname ) in ls : #NEWLINE# #INDENT# if ( fid not in self . _files_map ) : #NEWLINE# #INDENT# self . watch ( fname )