Lines Matching refs:filename

67         # a class method with filename as the first argument (after self)
71 filename = args[1]
75 backup_name = filename+'.bak'
76 copyfile(filename, backup_name)
85 copyfile(backup_name, filename)
149 def open(self, filename, mode):
151 f = file(filename, mode)
153 print 'could not open file %s: %s' % (filename, msg)
158 def skip(self, filename):
164 if os.path.islink(filename):
166 return lang_type(filename) not in self.languages
168 def apply(self, filename, regions=all_regions):
169 """Possibly apply to specified regions of file 'filename'.
179 if not (self.opt_skip or self.skip(filename)):
180 errors = self.check(filename, regions)
183 self.fix(filename, regions)
188 self.fix(filename, regions)
195 def check(self, filename, regions=all_regions, fobj=None, silent=False):
196 """Check specified regions of file 'filename'.
202 commit. This is needed keep the messages using 'filename' meaningful.
220 def fix(self, filename, regions=all_regions):
221 """Fix specified regions of file 'filename'.
230 def check(self, filename, regions=all_regions, fobj=None, silent=False):
233 fobj = self.open(filename, 'r')
236 lang = lang_type(filename)
247 (self.test_name, filename, num + 1))
256 def fix(self, filename, regions=all_regions):
257 f = self.open(filename, 'r+')
259 lang = lang_type(filename)
348 def check(self, filename, regions=all_regions, fobj=None, silent=False):
351 fobj = self.open(filename, 'r')
353 norm_fname = self.normalize_filename(filename)
362 language = lang_type(filename, old[0])
370 % (filename))
379 def fix(self, filename, regions=all_regions):
380 f = self.open(filename, 'r+')
384 language = lang_type(filename, lines[0])
385 sort_lines = list(self.sort_includes(lines, filename, language))
423 def fix(self, filename, regions=all_regions, **kwargs):