Package java.io

Examples of java.io.File.listFiles()


       
        String realPath = servlet.getServletContext().getRealPath("/");
        File resources = new File(realPath,ResourceServlet.relativePath);
        File tresources = new File(resources,path);
       
        File[] files = tresources.listFiles();
        Vector mfiles = new Vector();
        for( int i=0; i<files.length; i++ ) {
          mfiles.add(new org.nextime.ion.backoffice.bean.File(files[i]));
        }
       
View Full Code Here


        File root =
          new File(
            getServletContext().getRealPath("/"),
            resourcesPath);
        File dir = new File(root, bean.getDirectory());
        File[] files = dir.listFiles();
        for (int k = 0; k < files.length; k++) {
          File file = files[k];
          if (file.isFile()) {
            InputStream in = new FileInputStream(file);
            ZipEntry ze =
View Full Code Here

      }

      // add images
      File root =
        new File(getServletContext().getRealPath("/"), imagesPath);
      File[] files = root.listFiles();
      for (int k = 0; k < files.length; k++) {
        File file = files[k];
        if (file.isFile()) {
          InputStream in = new FileInputStream(file);
          ZipEntry ze = new ZipEntry("images/" + file.getName());
View Full Code Here

       
        String realPath = servlet.getServletContext().getRealPath("/");
        File resources = new File(realPath,ResourceServlet.relativePath);
        File tresources = new File(resources,path);
       
        File[] files = tresources.listFiles();
        Vector mfiles = new Vector();
        for( int i=0; i<files.length; i++ ) {
          mfiles.add(new org.nextime.ion.backoffice.bean.File(files[i]));
        }
       
View Full Code Here

    // check to see if this is a KnowledgeFlow package (presence of Beans.props file)
    if (updateKnowledgeFlow) {
      File packageToDel = new File(PACKAGE_MANAGER.getPackageHome().toString() + File.separator
          + packageName);
      if (packageToDel.exists() && packageToDel.isDirectory()) {
        File[] contents = packageToDel.listFiles();
        for (int i = 0; i < contents.length; i++) {
          if (contents[i].isFile() && contents[i].getPath().endsWith("Beans.props")) {
            // KnowledgeFlow plugin -- remove this properties file from the list of
            // bean plugin props
View Full Code Here

   * @return ���ض������ʼ�����
   * @throws IOException
   */
  public int read(Session ssn, List mails, List ident, int max_count) throws IOException{
    File fs = new File(path);
    File[] mailfiles = fs.listFiles(new FileFilter(){
      public boolean accept(File f) {
        if(f.length() > 0 && f.getName().endsWith(EML))
          return true;
        return false;
      }});
View Full Code Here

       
      }
     
      if ( app_dir.exists() && app_dir.isDirectory()){
       
        app_plugins = app_dir.listFiles().length;
       
      }
     
        // user ones first so they override app ones if present
     
View Full Code Here

    public void xtestCreateCollection() throws DbException {
        DbCollection coll = DbCollection.getRootCollection();
        DbCollection xmark = coll.createCollection(COL_NAME);
        assert (xmark.getDirectory().exists());
        File collDir = coll.getDirectory();
        File[] matchFiles = collDir.listFiles(new FileFilter() {
            public boolean accept(File f) {
                return f.isDirectory() && COL_NAME.equals(f.getName());
            }
        });
        assert (matchFiles.length > 0);
View Full Code Here

     */
    public static File[] getFiles(String location, FileConnection fc) {
      File datafile = fc.getFile(location);
         
          if (datafile.isDirectory()) {
            return datafile.listFiles();
          }
         
          String fname = datafile.getName();
          String ext = FileUtils.getExtension(fname);
          File parentDir = datafile.getParentFile();
View Full Code Here

                return true;

            }
        };

        File[] modelFiles = modelsDirFile.listFiles(fileFilter);

        return modelFiles;

    }
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.