size() public abstract method

public abstract size ( ) : Long
return Long
Beispiel #1
0
        void putCache(File file, Type t)
        {
            CachedScript c = new CachedScript();
              c.modified = file.modified();
              c.size     = file.size();
              c.typeName = t.qname();

              lock (m_cache) { m_cache[cacheKey(file)] = c; }
        }
Beispiel #2
0
        //////////////////////////////////////////////////////////////////////////
        // CachedScript
        //////////////////////////////////////////////////////////////////////////
        CachedScript getCache(File file)
        {
            lock (m_cache)
              {
            // check cache
            string key = cacheKey(file);
            CachedScript c = (CachedScript)m_cache[key];
            if (c == null) return null;

            // check that timestamp and size still the same
            if (OpUtil.compareEQ(c.modified, file.modified()) &&
            OpUtil.compareEQ(c.size, file.size()))
              return c;

            // nuke from cache
            m_cache.Remove(key);
            return null;
              }
        }