Lines Matching refs:file
31 # lanuage type for each file extension
66 # languages based on file prefix
74 # languages based on #! line of first file
88 firstline of the file. If the firstline of the file is not
89 provided and openok is True, open the file and read the first line
95 # first try to detect language based on file extension
101 # now try to detect language based on file prefix
106 # if a first line was not provided but the file is ok to open,
107 # grab the first line of the file.
109 handle = file(filename, 'r')
154 # try to figure out the language of the specified file
158 # if the file is one of the langauges that we want return
164 '''update a file of the specified language with the provided
165 mutator generator. If inplace is provided, update the file in
166 place and return the handle to the updated file. If inplace is
167 false, write the updated file to cStringIO'''
173 # if a filename was provided, open the file
178 src = file(src, mode)
182 # grab all of the lines of the file and strip them of their line ending
190 # if we're updating in place and the file hasn't changed, do nothing
194 # otherwise, truncate the file and seek to the beginning.
199 # if we're not updating in place and a destination file name
200 # was provided, create a file object
201 dst = file(dst, 'w')