001    /**
002     * Implements the CFML Function gettempdirectory
003     */
004    package railo.runtime.functions.system;
005    
006    import railo.runtime.PageContext;
007    import railo.runtime.ext.function.Function;
008    
009    public final class GetTempDirectory implements Function {
010            public static String call(PageContext pc ) {
011                    String fs=System.getProperty("file.separator");
012                    String path= pc.getConfig().getTempDirectory().getAbsolutePath();
013                    
014                    if(path.lastIndexOf(fs)!=path.length()-1)
015                            path+=fs;
016                    return path;
017            }
018    }