in src/main/java/org/apache/sling/fsprovider/internal/FileStatCache.java [105:129]
private FileStat getFileState(File file) {
String path = relativePath(providerFilePath, file.getPath());
if (StringUtils.isBlank(path)) {
return FileStat.EXISTING_DIRECTORY;
}
FileStat fileStat = fileStates.get(path);
if (fileStat == null) {
if (!parentExists(path, file)) {
LOG.trace("Does not exist (via parent): {}", path);
return FileStat.NON_EXISTING;
}
fileStat = FileStat.compute(file);
fileStates.put(path, fileStat);
if (fileStat.exists()) {
CacheStatistics.EXISTS_ACCESS.uncachedAccess(path);
} else {
CacheStatistics.NOT_EXISTS_ACCESS.uncachedAccess(path);
}
} else if (fileStat.exists()) {
CacheStatistics.EXISTS_ACCESS.cachedAccess(path);
} else {
CacheStatistics.NOT_EXISTS_ACCESS.cachedAccess(path);
}
return fileStat;
}