Implemented API delete method

This commit is contained in:
Joel Collins 2018-11-20 12:13:36 +00:00
parent e3724ffefc
commit ede218ccc3
4 changed files with 43 additions and 13 deletions

View file

@ -251,6 +251,12 @@ class StreamObject(object):
else:
return False
def delete(self):
"""Entirely delete all capture data."""
logging.info("Deleting {}".format(self.id))
self.delete_stream()
self.delete_file()
def shunt(self):
"""Demote the StreamObject from being stored in memory."""
if not self.file_exists: # If file doesn't already exist