* Add documentation for file_table. Add note for future hash: SHA1,256,...

master
wirawan 14 years ago
parent f42f2d82fa
commit 0531e4e511
  1. 7
      db/file_db.py

@ -1,4 +1,4 @@
# $Id: file_db.py,v 1.4 2010-05-28 18:46:16 wirawan Exp $ # $Id: file_db.py,v 1.5 2011-04-26 15:28:37 wirawan Exp $
# #
# wpylib.db.file_db module # wpylib.db.file_db module
# Created: 20100205 # Created: 20100205
@ -23,10 +23,15 @@ class file_rec(tuple):
pass pass
class file_table(object): class file_table(object):
"""A table (sqlite) to contain list of files and its fingerprints
(size, timestamp, hash).
Currently only MD5 hash is supported.
"""
# dtype for numpy (if wanted) # dtype for numpy (if wanted)
dtype = numpy.dtype([ dtype = numpy.dtype([
('filename', 'S256'), ('filename', 'S256'),
('md5', 'S32'), ('md5', 'S32'),
# TODO: use sha1/sha256/sha512 as well
('date', 'i4'), ('date', 'i4'),
('time', 'i4'), ('time', 'i4'),
('size', 'i8'), ('size', 'i8'),

Loading…
Cancel
Save