Implement flush

This commit is contained in:
Bo Maryniuk 2016-06-24 13:37:37 +02:00
parent 772f336cd7
commit 2e2a74677e

View File

@ -91,6 +91,16 @@ class CsvDB(object):
if os.path.exists(db_path):
shutil.rmtree(db_path, ignore_errors=True)
def flush(self, table):
'''
Flush table.
:param table:
:return:
'''
table_path = os.path.join(self.db_path, table)
if os.path.exists(table_path):
os.unlink(table_path)
def list(self):
'''