code: def _checkpath(self, path):
          
          if path.startswith("/") or ".." in path or path.strip() != path:
              raise NotFoundException()
docs: Checks that a given path is valid. If it's not, raises NotFoundException