def clean_cache(self):
"""
This method completely cleans the cache directory of this
``SpeechActionServer`` instance. Use with care.
"""
rospy.loginfo('Purging speech cache...')
for f in os.listdir(self._cache_dir):
if f == '.gitkeep':
continue
try:
p = os.path.join(self._cache_dir, f)
if os.path.isfile(p):
os.unlink(p)
except Exception as e:
rospy.logerr(e)
rospy.loginfo('Speech cache has been purged.')
self.cleaned_pub.publish()
评论列表
文章目录