code: def linkdir_walk(self):
          '''
          Return the expected result of an os.walk on the linkdir, based on the
          mountpoint value.
          '''
          try:
              # Use cached linkdir_walk if we've already run this
              return self._linkdir_walk
          except AttributeError:
              self._linkdir_walk = []
              try:
                  parts = self._mountpoint.split('/')
              except AttributeError:
                  log.error(
                      '%s class is missing a \'_mountpoint\' attribute',
                      self.__class__.__name__
                  )
              else:
                  for idx, item in enumerate(parts[:-1]):
                      try:
                          dirs = [parts[idx + 1]]
                      except IndexError:
                          dirs = []
                      self._linkdir_walk.append((
                          salt.utils.path.join(self.linkdir, *parts[:idx + 1]),
                          dirs,
                          []
                      ))
                  try:
                      # The linkdir itself goes at the beginning
                      self._linkdir_walk.insert(0, (self.linkdir, [parts[0]], []))
                  except IndexError:
                      pass
              return self._linkdir_walf linkdir_walk(self):
          '''
          Return the expected result of an os.walk on the linkdir, based on the
          mountpoint value.
          '''
          try:
              # Use cached linkdir_walk if we've already run this
              return self._linkdir_walk
          except AttributeError:
              self._linkdir_walk = []
              try:
                  parts = self._mountpoint.split('/')
              except AttributeError:
                  log.error(
                      '%s class is missing a \'_mountpoint\' attribute',
                      self.__class__.__name__
                  )
              else:
                  for idx, item in enumerate(parts[:-1]):
                      try:
                          dirs = [parts[idx + 1]]
                      except IndexError:
                          dirs = []
                      self._linkdir_walk.append((
                          salt.utils.path.join(self.linkdir, *parts[:idx + 1]),
                          dirs,
                          []
                      ))
                  try:
                      # The linkdir itself goes at the beginning
                      self._linkdir_walk.insert(0, (self.linkdir, [parts[0]], []))
                  except IndexError:
                      pass
              return self._linkdir_walk
docs: Return the expected result of an os.walk on the linkdir, based on the
          mountpoint value.