Package flex2.compiler.io

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


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

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

        return null;
View Full Code Here

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

        /*
        if ((resolved != null) && Trace.pathResolver)
View Full Code Here

            if (themeFiles[0].getName().endsWith(file.getPath()))
            {
                String name = themeFiles[0].getName();
                int index = name.indexOf(file.getPath());
                themeFiles[0] = new LocalFile(new File(name.substring(0, index) + "/themes/Halo/halo.swc"));
                themeNames.remove("spark");
                themeNames.add("halo");
            }
        }
View Full Code Here

        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

            if (themeFiles[0].getName().endsWith(file.getPath()))
            {
                String name = themeFiles[0].getName();
                int index = name.indexOf(file.getPath());
                themeFiles[0] = new LocalFile(new File(name.substring(0, index) + "/themes/Halo/halo.swc"));
                themeNames.remove("spark");
                themeNames.add("halo");
            }
        }
View Full Code Here

                    String original = (String) e.getAttributes().get(Transcoder.ORIGINAL);
                    if (src != null)
                    {
                      if (source.getRelativePath().length() == 0)
                      {
                        archiveFiles.put("locale/" + locales[i] + "/" + original, new LocalFile(new File(src)));
                      }
                      else
                      {
                        archiveFiles.put("locale/" + locales[i] + "/" + source.getRelativePath() + "/" + original, new LocalFile(new File(src)));
                      }
                    }
                  }
                }
          }
View Full Code Here

        // it's not in the HashMap. let's locate it in the file system.
        File absolute = FileUtil.openFile(name);
        if (absolute != null && FileUtils.exists(absolute))
        {
            return new LocalFile(absolute);
        }
       
        File relative = FileUtil.openFile(fullName);
        if (relative != null && FileUtils.exists(relative))
        {
            return new LocalFile(relative);
        }
       
        return null;
    }
View Full Code Here

     *
     * @param includeSource A source file.
     */
    public void addComponent(File includeSource)
    {
        sources.add(new LocalFile(includeSource));
    }
View Full Code Here

     *
     * @param includeSource A source file.
     */
    public void removeComponent(File includeSource)
    {
        sources.remove(new LocalFile(includeSource));
    }
View Full Code Here

TOP

Related Classes of flex2.compiler.io.LocalFile

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.