001 /** 002 * Implements the CFML Function getprofilesections 003 */ 004 package railo.runtime.functions.other; 005 006 import java.io.IOException; 007 008 import railo.commons.io.ini.IniFile; 009 import railo.commons.io.res.util.ResourceUtil; 010 import railo.runtime.PageContext; 011 import railo.runtime.exp.PageException; 012 import railo.runtime.ext.function.Function; 013 import railo.runtime.op.Caster; 014 015 public final class GetProfileSections implements Function { 016 public static railo.runtime.type.Struct call(PageContext pc , String fileName) throws PageException { 017 try { 018 return IniFile.getProfileSections(ResourceUtil.toResourceExisting(pc,fileName)); 019 } catch (IOException e) { 020 throw Caster.toPageException(e); 021 } 022 } 023 024 025 }