1 29 30 package com.caucho.config.types; 31 32 import com.caucho.config.NodeBuilder; 33 import com.caucho.config.TypeStrategy; 34 import com.caucho.util.L10N; 35 import com.caucho.vfs.Path; 36 37 import org.w3c.dom.Node ; 38 39 import java.io.File ; 40 41 public class FileTypeStrategy extends TypeStrategy { 42 protected static final L10N L = new L10N(FileTypeStrategy.class); 43 44 51 public Object configure(NodeBuilder builder, Node node, Object parent) 52 throws Exception 53 { 54 String userPath = builder.configureString(node); 55 56 Path path = PathTypeStrategy.lookupPath(userPath); 57 58 return new File (path.getNativePath()); 59 } 60 } 61 | Popular Tags |