public boolean hasPotentialAvailableSpace(int fileSize) {
        if (fileSize <= 0) {
            return false;
        }

        // check if enough space left
        if (getAvailableSpace() > fileSize) {
            return true;
        }

        Iterator it = fileList_.iterator();
        File file = null;
        int deletedFileSize = 0;

        // if not enough space, then if want to clear some files
        boolean result = false;
        while (it.hasNext()) {
            file = (File) it.next();
            if (!file.isReadOnly()) {
                deletedFileSize += file.getSize();
            }

            if (deletedFileSize > fileSize) {
                result = true;
                break;
            }
        }

        return result;
    }