1 28 29 package com.caucho.vfs; 30 31 import com.caucho.loader.EnvironmentLocal; 32 33 import java.util.Map ; 34 35 38 public class ConfigPath extends Path { 39 private static final EnvironmentLocal<RemotePwd> _remotePath 40 = new EnvironmentLocal<RemotePwd>(); 41 42 45 ConfigPath() 46 { 47 super(null); 48 } 49 50 53 public static void setRemote(Path remotePath) 54 { 55 _remotePath.set(new RemotePwd(remotePath, Vfs.lookup())); 56 } 57 58 68 protected Path schemeWalk(String userPath, 69 Map <String ,Object > newAttributes, 70 String newPath, int offset) 71 { 72 throw new UnsupportedOperationException (); 73 94 } 95 96 99 public String getScheme() 100 { 101 Path path = Vfs.lookup(); 102 103 return path.getScheme(); 104 } 105 106 109 public String getPath() 110 { 111 Path path = Vfs.lookup(); 112 113 return path.getPath(); 114 } 115 116 static class RemotePwd { 117 Path _remote; 118 Path _pwd; 119 120 RemotePwd(Path remote, Path pwd) 121 { 122 _remote = remote; 123 _pwd = pwd; 124 } 125 126 Path getRemote() 127 { 128 return _remote; 129 } 130 131 Path getPwd() 132 { 133 return _pwd; 134 } 135 } 136 } 137 | Popular Tags |