mirror of
https://github.com/valitydev/salt.git
synced 2024-11-08 17:33:54 +00:00
Implement flush
This commit is contained in:
parent
772f336cd7
commit
2e2a74677e
@ -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):
|
||||
'''
|
||||
|
Loading…
Reference in New Issue
Block a user