import posixpath


def ls(session, path):  # pylint: disable=invalid-name
    """
        List files on an iRODS server.

        Args:
            session (iRODS.session.iRODSSession): iRODS session
            path (String): path on iRODS server to list. Must be absolute.
    """
    coll = session.collections.get(posixpath.join('/', path))

    return ([obj.name for obj in coll.data_objects],
            [obj.name for obj in coll.subcollections])