public VFSMount(String mount,
String path) throws IOException {
path.replace('\\", '/");
// Replace any tokens
int index = path.indexOf("%HOME%");
if (index >= 0) {
path = ((index > 0) ? path.substring(0, index) : "") +
ConfigurationLoader.getHomeDirectory() +
(((index + 6) < (path.length() - 1))
? path.substring(index +
((path.charAt(index + 6) == '/") ? 7 : 6)) : "");
}
File f = new File(path);
if (!f.exists()) {
f.mkdirs();
}
if (!mount.trim().startsWith("/")) {
this.mount = "/" + mount.trim();
} else {
this.mount = mount.trim();
}
this.path = f.getCanonicalPath();
}
Creates a new VFSMount object. Parameters:
mount -
path -
Throws:
IOException -
|