code: def get_permissions(self, path):
          
          path = pathlib.PurePosixPath(path)
          parents = filter(lambda p: p.is_parent(path), self.permissions)
          perm = min(
              parents,
              key=lambda p: len(path.relative_to(p.path).parts),
              default=Permission(),
          )
          return perm
docs: Return nearest parent permission for `path`.
  
          :param path: path which permission you want to know
          :type path: :py:class:`str` or :py:class:`pathlib.PurePosixPath`
  
          :rtype: :py:class:`aioftp.Permission`