//
@co_call(par_area,par_class,'getPath',par_id=>par_id,par_area=>par_area,par_class=>par_class);
partial_path = cou_getReturnValue( cnx, CO_STRING, &err );
pathname = ap_psprintf( p, "%s/%s", cou_getCODataPath() , partial_path );

fd = ap_popenf(p, pathname, O_RDONLY, 0);

if (fd == -1)
{
__SEND_MESG_DEBUG("Could not open file: %s", pathname)
cou_error( cnx, "Could not open file");
}

if (fstat(fd, &stat_buf)==-1) /* can't stat file */
{
__SEND_MESG_DEBUG("Could not stat file: %s", pathname)
cou_error( cnx, "Could not stat file");
}
length = stat_buf.st_size+1;

map=mmap( 0, length, PROT_READ, MAP_SHARED, fd, 0);

__SEND_MESG_DEBUG("MMapped %s", pathname)

cou_setReturnValue(cnx,
ap_pstrndup( p, map, length ),
CO_STRING);

munmap(map, length);
if (ap_pclosef(p, fd) == -1) cou_logError(cnx, CO_LOG_DEBUG, "couldn't close file %s", pathname);

__SEND_MESG_DEBUG("getFileAsString")