Package org.bladerunnerjs.model

Examples of org.bladerunnerjs.model.FileInfo


    File themesDir = assetContainer.file("themes");
    if(!themesDir.exists()){
      return;
    }
   
    FileInfo themesDirInfo = brjs.getFileInfo(themesDir);
    for(File themeDir : themesDirInfo.dirs()) {
      String relativePath = RelativePathUtility.get(brjs.getFileInfoAccessor(), assetContainer.dir(), themeDir);
      assetLocationDirectories.add(relativePath);
    }
  }
View Full Code Here


public class RelativePathUtility {
  public static String get(FileInfoAccessor fileInfoAccessor, File basePath, File childPath) {
    String baseCanonicalPath,  childCanonicalPath;
   
    try {
      FileInfo baseFileInfo = fileInfoAccessor.getFileInfo(basePath);
      FileInfo childFileInfo = fileInfoAccessor.getFileInfo(childPath);
      baseCanonicalPath = baseFileInfo.canonicalPath();
      childCanonicalPath = childFileInfo.canonicalPath();
    } catch (NullPointerException ex) {
      //TODO: fix the chicken/egg issue that causes this NPE if RelaltivePath is used during the file modification service constructor
      baseCanonicalPath = getCanonicalPath(basePath);
      childCanonicalPath = getCanonicalPath(childPath);     
    }
View Full Code Here

   
    this.appServer = appServer;
    this.brjs = brjs;
   
    for(File rootWatchDir : rootWatchDirs) {
      FileInfo rootWatchDirInfo = brjs.getFileInfo(rootWatchDir);
     
      if (rootWatchDirInfo.isDirectory())
      {
        watchDirIterators.add(rootWatchDirInfo);
      }
    }
  }
View Full Code Here

  private Set<String> calculateContentPathsForThemesAndResources(AssetContainer container, String themeRequestName, String resourcesRequestName, String... requestArgs) throws MalformedTokenException, ConfigException
  {
    Set<String> contentPaths = new LinkedHashSet<>();
    for (ResourcesAssetLocation assetLocation : getResourceAssetLocations(container)){
      File assetLocationDir = assetLocation.dir();
      FileInfo assetLocationDirInfo = brjs.getFileInfo(assetLocationDir);
      if (assetLocationDirInfo.isDirectory()){
        for (File file : assetLocationDirInfo.nestedFiles()) {
          if (!fileIgnoredByBrjsConfig(file)) {
            createRequestForNestedDir(container, themeRequestName, resourcesRequestName, contentPaths, assetLocation, file, requestArgs);
          }
        }
      }
View Full Code Here

      String dirNameExcludeMatcher = getDirNameMatcher(dirNameExcludeFilter);
     
      List<File> childDirs = rootNode.getFileInfo(childDir).dirs();
      for(File file : childDirs)
      {
        FileInfo fileInfo = rootNode.getFileInfo(file);
       
        if ( fileInfo.isDirectory() && (dirNameMatcher == null || file.getName().matches(dirNameMatcher) ) )
        {
          String childName = file.getName();
         
          if ( !(dirNameExcludeMatcher != null && childName.matches(dirNameExcludeMatcher)) ) {
            if(dirNameFilter != null)
View Full Code Here

TOP

Related Classes of org.bladerunnerjs.model.FileInfo

Copyright © 2018 www.massapicom. 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.