(bind-func sys_filepath_root
(lambda (filepath)
(letz ((pool (apr_pool_create))
(root:i8** (zalloc))
(filename:i8** (zalloc))
(res APR_SUCCESS)
(path_list null))
(pset! filename 0 (cstring filepath))
(set! res (apr_filepath_root root filename 0 pool))
(if (= res APR_SUCCESS)
(set! path_list (list (Str (pref root 0))
(Str (pref filename 0)))))
(apr_pool_destroy pool)
path_list)))