Examples of LocalFile


Examples of flex2.compiler.io.LocalFile

        VirtualFile result;
        File file = FileUtil.openFile(path);

        if (file != null && FileUtils.exists(file))
        {
            result = new LocalFile(FileUtil.getCanonicalFile(file));
        }
        else
        {
            PathResolver resolver = ThreadLocalToolkit.getPathResolver();
            result = resolver.resolve(path);
View Full Code Here

Examples of flex2.compiler.io.LocalFile

    addPathElements(classPath, directories, allowSourcePathOverlap, warnings);
 

  private Source newSource(File file, File pathRoot, String namespaceURI, String localPart)
  {
        Source source = new Source(new LocalFile(file), new LocalFile(pathRoot),
                                   namespaceURI.replace('.', '/'), localPart, this, false, false);

        if (applicationCache != null)
        {
            String className = CompilerAPI.constructClassName(namespaceURI, localPart);
View Full Code Here

Examples of flex2.compiler.io.LocalFile

            {
                File file = FileUtil.openFile(directory, relativePath);

                if ((file != null) && file.exists())
                {
                    return new LocalFile(file);
                }
            }
        }

        return null;
View Full Code Here

Examples of flex2.compiler.io.LocalFile

            AtEmbed e = (AtEmbed) i.next();
            String src = (String) e.getAttributes().get(Transcoder.SOURCE);
            String original = (String) e.getAttributes().get(Transcoder.ORIGINAL);
            if (src != null)
            {
              archiveFiles.put(original, new LocalFile(new File(src)));
            }
          }
          if (archiveFiles.size() > 0)
          {
            context.setAttribute(CompilerContext.CSS_ARCHIVE_FILES, archiveFiles);
View Full Code Here

Examples of flex2.compiler.io.LocalFile

        {          
            String filename = entry.getKey();
            Long dataFileLastModified = entry.getValue();
            Long localFileLastModified = null;

            LocalFile localFile = new LocalFile(new File(filename));
            localFileLastModified = new Long(localFile.getLastModified());
           
            if (!dataFileLastModified.equals(localFileLastModified))
            {
                if (Trace.swcChecksum)
                {
View Full Code Here

Examples of flex2.compiler.io.LocalFile

    for (int i = 0, size = directories == null ? 0 : directories.size(); i < size; i++)
    {
      String dir = directories.get(i).getAbsolutePath();
      if (name.startsWith(dir))
      {
        return new LocalFile(FileUtil.openFile(dir));
      }
    }
    // return new LocalFile(FileUtil.openFile(f.getParent()));
    return null;
  }
View Full Code Here

Examples of flex2.compiler.io.LocalFile

  private String[] locales;
  private Map<String, List<File>> rbDirectories;
 
  private Source newSource(String name, VirtualFile[] files, VirtualFile[] pathRoots, File pathRoot, String namespaceURI, String localPart)
  {
    return new Source(new ResourceFile(name, locales, files, pathRoots), new LocalFile(pathRoot),
              namespaceURI.replace('.', '/'), localPart , this, false, false, false);
  }
View Full Code Here

Examples of flex2.compiler.io.LocalFile

          {
            pathRoot = d;
            name = FileUtil.getCanonicalPath(f);
          }
         
          files[i] = new LocalFile(f);
          pathRoots[i] = new LocalFile(d);
          break;
        }
      }
    }
View Full Code Here

Examples of flex2.compiler.io.LocalFile

        try
        {
          if ((f = findFile(d, p, mimeTypes)) != null)
          {
            if (files == null) files = new VirtualFile[length];
            files[i] = new LocalFile(f);
            break;
          }
        }
        catch (CompilerException ex)
        {
View Full Code Here

Examples of flex2.compiler.io.LocalFile

        if ((absoluteOrRelativeFile != null) &&
            FileUtils.exists(absoluteOrRelativeFile) &&
            FileUtils.isAbsolute(absoluteOrRelativeFile))
        {
            resolved = new LocalFile(absoluteOrRelativeFile);
        }
        else if (root != null)
        {
            String rootRelativePath = root + File.separator + path;
            File rootRelativeFile = FileUtil.openFile(rootRelativePath);
            if ((rootRelativeFile != null) && FileUtils.exists(rootRelativeFile))
            {
                resolved = new LocalFile(rootRelativeFile);
            }
        }
        else
        {
          // C: must convert 'absoluteOrRelativeFile' into absolute before calling exists().
            absoluteOrRelativeFile = FileUtils.getAbsoluteFile(absoluteOrRelativeFile);
            if ((absoluteOrRelativeFile != null) &&
                FileUtils.exists(absoluteOrRelativeFile))
                // && !FileUtils.isAbsolute(absoluteOrRelativeFile)
            {
              resolved = new LocalFile(absoluteOrRelativeFile);
            }
        }

        if ((resolved != null) && Trace.pathResolver)
        {
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.