From 0531e4e511020304375d000c2c5f390d4ecf5a68 Mon Sep 17 00:00:00 2001 From: wirawan Date: Tue, 26 Apr 2011 15:28:37 +0000 Subject: [PATCH] * Add documentation for file_table. Add note for future hash: SHA1,256,... --- db/file_db.py | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/db/file_db.py b/db/file_db.py index aaa5db5..5db8946 100644 --- a/db/file_db.py +++ b/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 # Created: 20100205 @@ -23,10 +23,15 @@ class file_rec(tuple): pass 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 = numpy.dtype([ ('filename', 'S256'), ('md5', 'S32'), + # TODO: use sha1/sha256/sha512 as well ('date', 'i4'), ('time', 'i4'), ('size', 'i8'),