Lines Matching refs:file

161     si.SetProperty(PID_WORDCOUNT, 2) # long file names, compressed, original media
197 def gen_id(self, file):
198 logical = _logical = make_id(file)
206 def append(self, full, file, logical):
210 logical = self.gen_id(file)
231 time. Files are added into the current component, and into the cab file.
290 def make_short(self, file):
291 oldfile = file
292 file = file.replace('+', '_')
293 file = ''.join(c for c in file if not c in r' "/\[]:;=,')
294 parts = file.split(".")
302 prefix = file.upper()
304 if len(parts) < 3 and len(prefix) <= 8 and file == oldfile and (
307 file = prefix+"."+suffix
309 file = prefix
311 file = None
312 if file is None or file in self.short_names:
319 file = "%s~%d.%s" % (prefix, pos, suffix)
321 file = "%s~%d" % (prefix, pos)
322 if file not in self.short_names: break
327 self.short_names.add(file)
328 assert not re.search(r'[\?|><:/*"+,;=\[\]]', file) # restrictions on short names
329 return file
331 def add_file(self, file, src=None, version=None, language=None):
332 """Add a file to the current component of the directory, starting a new one
333 if there is no current component. By default, the file name in the source
334 and the file table will be identical. If the src file is specified, it is
340 # Allow relative paths for file if src is not specified
341 src = file
342 file = os.path.basename(file)
344 assert not re.search(r'[\?|><:/*]"', file) # restrictions on long names
345 if file in self.keyfiles:
346 logical = self.keyfiles[file]
349 sequence, logical = self.cab.append(absolute, file, logical)
352 short = self.make_short(file)
353 full = "%s|%s" % (short, file)
363 # # Add hash if the file is not versioned
372 if file.endswith(".py"):
374 [(logical+"c", self.component, "%sC|%sc" % (short, file),
376 (logical+"o", self.component, "%sO|%so" % (short, file),