001    /**
002     * Implements the Cold Fusion Function getcurrenttemplatepath
003     */
004    package railo.runtime.functions.system;
005    
006    import railo.commons.io.res.util.ResourceUtil;
007    import railo.runtime.PageContext;
008    import railo.runtime.exp.ExpressionException;
009    import railo.runtime.ext.function.Function;
010    
011    public final class GetCurrentTemplatePath implements Function {
012            public static String call(PageContext pc ) throws ExpressionException {
013                    return ResourceUtil.getResource(pc, pc.getCurrentTemplatePageSource()).getAbsolutePath();
014                    //return pc.getCurrentTemplatePageSource().getPhyscalFile().getAbsolutePath();
015            }
016    }