Ejemplo n.º 1
0
 def destroy(self):
     fullpath = self.folder + "/" + self.file_name
     if (not os.path.exists(fullpath)):
         raise DatabaseError.FileNotExistError(fullpath)
     os.remove(fullpath)
     fullpath = self.folder + "/" + self.file_name.replace('db', 'csv')
     os.remove(fullpath)
Ejemplo n.º 2
0
 def __check_reading_path__(self, fullpath):
     if (self.file_name == ""):
         raise DatabaseError.EmptyFileNameError()
     if (not os.path.exists(fullpath)):
         raise DatabaseError.FileNotExistError(fullpath)