Package org.nutz.resource.impl

Examples of org.nutz.resource.impl.FileResource


      if (null == f || f.isDirectory()) {
        list.addAll(scan(path, regex));
      }
      // 普通磁盘文件
      else if (f.isFile()) {
        list.add(new FileResource(f));
      }
      // 存放在 jar 中的文件
      else if (isInJar(f)) {
        NutResource nutResource = makeJarNutResource(f);
        if (nutResource != null) {
View Full Code Here


                if (srcFile.isDirectory()) {
                    Disks.visitFile(srcFile,
                                    new ResourceFileVisitor(list, src),
                                    new ResourceFileFilter(pattern));
                } else {
                    list.add(new FileResource(src, srcFile));
                }
            }
            else
                scan(src.substring(1), regex);
            //虽然已经找到一些了, 但还是扫描一些吧,这样才全!!
View Full Code Here

        }
    }

    public static class ResourceFileVisitor implements FileVisitor {
        public void visit(File f) {
            list.add(new FileResource(base, f));
        }
View Full Code Here

        for (String path : paths) {
            List<NutResource> resources;
            if (path.endsWith(".js")) {
                File f = Files.findFile(path);
                resources = new ArrayList<NutResource>();
                resources.add(new FileResource(f));
            } else {
                resources = Scans.me().scan(path, "\\.js$");
            }

            for (NutResource nr : resources) {
View Full Code Here

                if (srcFile.isDirectory()) {
                    Disks.visitFile(srcFile,
                                    new ResourceFileVisitor(list, src),
                                    new ResourceFileFilter(pattern));
                } else {
                    list.add(new FileResource(src, srcFile));
                }
            }
            else
                scan(src.substring(1), regex);
            //虽然已经找到一些了, 但还是扫描一些吧,这样才全!!
View Full Code Here

        }
    }

    public static class ResourceFileVisitor implements FileVisitor {
        public void visit(File f) {
            list.add(new FileResource(base, f));
        }
View Full Code Here

        for (String path : paths) {
            List<NutResource> resources;
            if (path.endsWith(".js")) {
                File f = Files.findFile(path);
                resources = new ArrayList<NutResource>();
                resources.add(new FileResource(f));
            } else {
                resources = Scans.me().scan(path, "\\.js$");
            }

            for (NutResource nr : resources) {
View Full Code Here

TOP

Related Classes of org.nutz.resource.impl.FileResource

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.