public function delete($key) { if (!$this->lock($key)) { return false; } $path = $this->path($key); try { $this->filesystem->delete($path); $this->unlock($key); return true; } catch (FileNotFoundException $e) { $this->unlock($key); return false; } }