Lines Matching refs:file

3 For database spam, spam.dir contains the index (a text file),
4 spam.bak *may* contain a backup of the index (also a text file),
5 while spam.dat contains the data (a binary file).
53 # The directory file is a text file. Each line looks like
56 # file of the associated value's first byte, and siz is the number
60 # The data file is a binary file pointed into by the directory
61 # file, and holds the values associated with keys. Each value
67 # The index is an in-memory dict, mirroring the directory file.
81 # Mod by Jack: create data file if needed
92 # Read directory file into the in-memory index dict.
110 # Write the index dict to the directory file. The original directory
111 # file (if any) is renamed with a .bak extension first. If a .bak
112 # file currently exists, it's deleted.
154 # Append val to the data file, starting at a _BLOCKSIZE-aligned
155 # offset. The data file is first padded with NUL bytes (if needed)
168 # Write val to the data file, starting at offset pos. The caller
178 # key is a new key whose associated value starts in the data file
180 # the in-memory index dict, and append one to the directory file.
217 # file now: _setval() and _addval() don't update the directory
218 # file. This also means that the on-disk directory and data
235 # XXX keep the directory file in synch. Why should we? Or
281 def _chmod(self, file):
282 self._os.chmod(file, self._mode)
291 def open(file, flag='c', mode=0o666):
292 """Open the database file, filename, and return corresponding object.
300 The optional mode argument is the UNIX mode of the file, used only when
317 return _Database(file, mode, flag=flag)