if(debugEnabled) { log.debug("file="+filename); } String dir= sfResolve(varDir, (String) null, false); File file; if(dir!=null) { dir= platform.convertFilename(dir); if ( debugEnabled ) {
File parentDir = null; String dir = lookupAbsolutePath(this, varDir, (String) null, (File) null, false, null); if (dir != null) { if (debugEnabled) {
    public void bind() throws RemoteException, SmartFrogRuntimeException {        PlatformHelper platform= PlatformHelper.getLocalPlatform();        String filename = sfResolve(varFilename,(String)null,true);        filename=platform.convertFilename(filename);        boolean debugEnabled = log.isDebugEnabled();        if(debugEnabled) {            log.debug("file="+filename);        }        String dir= sfResolve(varDir, (String) null, false);        File file;        if(dir!=null) {            dir= platform.convertFilename(dir);            if ( debugEnabled ) {                log.debug("dir=" + dir);            }            File parent=new File(dir);            file=new File(parent,filename);        } else {            file=new File(filename);        }        if ( debugEnabled ) {            log.debug("absolute file=" + file.toString());        }        bind(file);        mustExist =getBool(varMustExist,false,false);        mustRead = getBool(varMustWrite, false, false);        mustWrite = getBool(varMustRead, false, false);        mustBeDir = getBool(varMustBeDir, false, false);        mustBeFile = getBool(varMustBeFile, false, false);        testOnStartup = getBool(varTestOnStartup, false, false);        testOnLiveness = getBool(varTestOnLiveness, false, false);        exists = file.exists();        boolean isDirectory;        boolean isFile;        boolean isEmpty;        long timestamp;        long length;        if(exists) {            isDirectory = file.isDirectory();            if(isDirectory && debugEnabled ) {                log.debug("file is a directory");            }            isFile = file.isFile();            if(isFile && debugEnabled ) {                log.debug("file is a normal file");            }            timestamp = file.lastModified();            length = file.length();        } else {            if(debugEnabled) {                log.debug("file does not exist");            }            isDirectory=false;            isFile = false;            timestamp=-1;            length=0;        }        isEmpty = length == 0;        setAttribute(varExists, exists);        setAttribute(varIsDirectory,isDirectory);        setAttribute(varIsFile,isFile);        setAttribute(varIsEmpty,isEmpty);        setAttribute(varTimestamp, timestamp);        setAttribute(varLength, length);        String name=getFile().getName();        sfReplaceAttribute(varShortname,name);    }