Examples of lastModified()


Examples of java.io.File.lastModified()

       
        File destFile = getDestinationFile(javaClass);
        File sourceFile = getSourceFile(javaClass);

        return !(destFile.exists() &&
            sourceFile.lastModified() < destFile.lastModified());
    }
   
    /**
     * Returns a File object representing the Source File represented
     * by the given JavaClass
View Full Code Here

Examples of java.io.File.lastModified()

            + "\" />");
      } catch (Exception e) {
        throw new HelpException("Error while loading [" + xmlFile + "]", e);
      }

      if (outputFile.exists() && outputFile.lastModified() >= sourceFile.lastModified())
        continue;

      log.debug("transforming help file to [" + outputFile.getPath() + "]");
      StreamResult result = new StreamResult(outputFile);
View Full Code Here

Examples of java.io.File.lastModified()

            Collection beans = ejbUtils.getBeans(getMetadata());
            File sourceFile = null;
            for (Iterator iterator = beans.iterator(); iterator.hasNext();) {
                JavaClass javaClass = (JavaClass) iterator.next();
                sourceFile = getSourceFile(javaClass);
                if (destFile.lastModified() < sourceFile.lastModified()) {
                    System.out.println("dirty source = " + sourceFile.getAbsolutePath());
                    dirty = true;
                    break;
                }
            }
View Full Code Here

Examples of java.io.File.lastModified()

    _url = url;
    _connection = url.openConnection();
    if (_url.getProtocol().equals("file")) {
      File file = new File(_url.getFile());
      if (file.exists()) {
        _lastModified = file.lastModified();
      }
    }
  }
 
 
View Full Code Here

Examples of java.io.File.lastModified()

          Map<?, ?> oldMapTrackUsage = FileUtil.readResilientFile(f);
          String version = MapUtils.getMapString(oldMapTrackUsage, "version",
              null);
          Map<?, ?> map = MapUtils.getMapMap(oldMapTrackUsage, "statsmap", null);
          if (version != null && map != null) {
            PlatformConfigMessenger.sendUsageStats(map, f.lastModified(),
                version, null);
          }
        }

        SimpleTimer.addPeriodicEvent("UsageTracker", 1000,
View Full Code Here

Examples of java.io.File.lastModified()

        DebugFile.writeln("File not found " + sFilePath);
        DebugFile.decIdent();
      }
      throw new FileNotFoundException(sFilePath);
    }
    long lastMod = oFile.lastModified();

    TransformerFactory oFactory;
    Templates oTemplates;
    StreamSource oStreamSrc;
    SheetEntry oSheet = (SheetEntry) oCache.get(sFilePath);
View Full Code Here

Examples of java.io.File.lastModified()

    }
   
    public void addFile(String fileName) {
        File file = new File(fileName);       
        if ( file.exists() ) {
            long lastModified = file.lastModified();
            fileMap.put(fileName,new Long(lastModified));
        }
    }       
    /**
     * Adds FileListener
View Full Code Here

Examples of java.io.File.lastModified()

        return null;
    }
   
    private long checkFile(String fileName,long lm) {       
        File newFile = new File(fileName);
        if( newFile.lastModified() > lm ) {           
            lm = newFile.lastModified();
            String configName = (String)configMap.get(newFile);
            List all = (List)fileListenerList.get(configName);
            Iterator iterator = all.iterator();
            while( iterator.hasNext() ) {
View Full Code Here

Examples of java.io.File.lastModified()

    }
   
    private long checkFile(String fileName,long lm) {       
        File newFile = new File(fileName);
        if( newFile.lastModified() > lm ) {           
            lm = newFile.lastModified();
            String configName = (String)configMap.get(newFile);
            List all = (List)fileListenerList.get(configName);
            Iterator iterator = all.iterator();
            while( iterator.hasNext() ) {
                FileListener listener = (FileListener)iterator.next();               
View Full Code Here

Examples of java.io.File.lastModified()

                                resource.getOutputPattern(),
                                templateContext));

                    final boolean lastModifiedCheck = resource.isLastModifiedCheck();
                    // - if we have the last modified check set, then make sure the last modified time is greater than the outputFile
                    if (!lastModifiedCheck || (lastModifiedCheck && ResourceUtils.getLastModifiedTime(resourceUrl) > outputFile.lastModified()))
                    {   
                        // - only write files that do NOT exist, and
                        //   those that have overwrite set to 'true'
                        if (!outputFile.exists() || resource.isOverwrite())
                        {
View Full Code Here
TOP
Copyright © 2018 www.massapi.com. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.