File file = new File(parentDir, filename);
File file = new File(filename);
    public void bind() throws RemoteException, SmartFrogRuntimeException {        boolean debugEnabled = log.isDebugEnabled();        File parentDir = null;        String dir = FileSystem.lookupAbsolutePath(this,                ATTR_DIR,                (String) null,                (File) null,                false,                null);        if (dir != null) {            if (debugEnabled) {                log.debug("dir=" + dir);            }            parentDir = new File(dir);        }        String filename = FileSystem.lookupAbsolutePath(this,                ATTR_FILENAME,                (String) null,                parentDir,                true,                null);        File file = new File(parentDir, filename);        if (debugEnabled) {            log.debug("absolute file=" + file.toString());        }        bind(file);        //now test our state        mustExist = getBool(ATTR_MUST_EXIST, false, false);        mustRead = getBool(ATTR_MUST_WRITE, false, false);        mustWrite = getBool(ATTR_MUST_READ, false, false);        mustBeDir = getBool(ATTR_MUST_BE_DIR, false, false);        mustBeFile = getBool(ATTR_MUST_BE_FILE, false, false);        testOnStartup = getBool(ATTR_TEST_ON_STARTUP, false, false);        testOnLiveness = getBool(ATTR_TEST_ON_LIVENESS, false, false);        exists = file.exists();        boolean isDirectory;        boolean isFile;        boolean isEmpty;        boolean isHidden;        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();            isHidden = file.isHidden();        } else {            if (debugEnabled) {                log.debug("file does not exist");            }            isDirectory = false;            isFile = false;            timestamp = -1;            length = 0;            isHidden = false;        }        isEmpty = length == 0;        setAttribute(ATTR_EXISTS, exists);        setAttribute(ATTR_IS_DIRECTORY, isDirectory);        setAttribute(ATTR_IS_FILE, isFile);        setAttribute(ATTR_IS_EMPTY, isEmpty);        setAttribute(ATTR_IS_HIDDEN, isHidden);        setAttribute(ATTR_TIMESTAMP, timestamp);        setAttribute(ATTR_LENGTH, length);        String name = getFile().getName();        setAttribute(ATTR_SHORTNAME, name);    }