| 1 | package gnu.io.installer; |
| 2 | |
| 3 | import java.util.Hashtable; |
| 4 | import java.util.Enumeration; |
| 5 | import java.io.File; |
| 6 | |
| 7 | public class InstallInstruction{ |
| 8 | Hashtable dirpaths = new Hashtable(); |
| 9 | |
| 10 | public void addResource(File path,String resource){ |
| 11 | if(path == null || resource == null) return; |
| 12 | String fr = (String)dirpaths.get(path); |
| 13 | if(fr != null && fr.equals(resource)) return; |
| 14 | dirpaths.put(path,resource); |
| 15 | } |
| 16 | |
| 17 | public Enumeration getKeys(){ |
| 18 | if(dirpaths == null) return null; |
| 19 | return dirpaths.keys(); |
| 20 | } |
| 21 | |
| 22 | public String getPath(File f){ |
| 23 | if(f == null || dirpaths == null) return null; |
| 24 | return (String)dirpaths.get(f); |
| 25 | } |
| 26 | |
| 27 | } |
| 28 | |
| 29 |