// log.trace("/vfs/cache", "[resolve()] File " + pe + ", faster = " + faster);
List res = new ArrayList();
List[] result = new List[]{res};
res.add(pe);
Iterator it = pe.iterateTokens();
FileName path = new FileName(new Vector(), true);
int i = 0;
while (it.hasNext()) {
i++;
Object token = it.next();
path = path.absolutize((String) token);
// System.out.println( "[VFSCacheWrapper] [resolve()] Step = " +path );
// log.trace("/vfs/cache", "Step = " + path);
// System.out.println( "[VFSCacheWrapper] [resolve()] tokens = " +path );
// log.trace("/vfs/cache", "tokens = " + path);
FileInfo[] fromCache = getFileInfo(path);
FileInfo fi;
// if not cached
// and not cached as inexisting
if (fromCache != null && fromCache[0] != null)
fi = fromCache[0];
else {
// ce pa imamo slucajno cachirano, da ne obstaja potem je resolve success!
boolean[] existsFromCache = exists(path);
if (existsFromCache != null && existsFromCache[0] == false) {
res.add(path);
break;
}
result = null;
break;
}
if (fi.isLink()) {
path = fi.getTarget();
if (!faster) {
FileName tmp = path;
for (int j = i; j < pe.getTokens().size(); j++)
tmp.absolutize((String) pe.getTokens().get(j));
res.add(tmp);
}
}
}