svn-gvsig-desktop / tags / v1_1_Build_1013 / libraries / libFMap / src / com / iver / cit / gvsig / fmap / drivers / shp / MyFileFilter.java @ 13521
History | View | Annotate | Download (499 Bytes)
1 |
package com.iver.cit.gvsig.fmap.drivers.shp; |
---|---|
2 |
|
3 |
import java.io.File; |
4 |
import java.io.FileFilter; |
5 |
|
6 |
public class MyFileFilter implements FileFilter { |
7 |
private String shpPath; |
8 |
public MyFileFilter(String shpPath){ |
9 |
this.shpPath=shpPath;
|
10 |
} |
11 |
public boolean accept(File pathname) { |
12 |
String strend=pathname.getAbsolutePath();
|
13 |
strend=strend.substring(0,strend.length()-3); |
14 |
String strshp=shpPath.substring(0, shpPath.length() - 3); |
15 |
if (strend.equals(strshp)) {
|
16 |
return true; |
17 |
} |
18 |
return false; |
19 |
} |
20 |
|
21 |
} |