Docjar: A Java Source and Docuemnt Enginecom.*    java.*    javax.*    org.*    all    new    plug-in

Quick Search    Search Deep

Source code: com/flexstor/common/io/xfile/ftp/filters/FtpDirFilter.java


1   /*
2    * FtpDirFilter.java
3    *
4    * Copyright $Date: 2003/08/11 02:22:49 $ FLEXSTOR.net Inc.
5    *
6    * This work is licensed for use and distribution under license terms found at
7    * http://www.flexstor.org/license.html
8    *
9    */
10  
11  package com.flexstor.common.io.xfile.ftp.filters;
12  
13  import com.flexstor.common.io.xfile.FlexXFileI;
14  import com.flexstor.common.io.xfile.ftp.FtpFilenameFilter;
15  
16  public class FtpDirFilter implements FtpFilenameFilter
17  {
18  
19     public boolean accept(FlexXFileI xfile, String s)
20     {
21        if(!xfile.getFileSystemName().equals("ftp")) return false;
22        //FtpFile file = new FtpFile( (FtpFile) xfile,s);
23        //if(file.isDirectory()) return true;
24        //else return false;
25        
26        
27        
28        //Modified by Manish as its just a string test..we dont need to create a new FTPFile
29        
30        if(s.endsWith("/")) return true;
31        else return false;
32        
33     }
34  
35  }