private static File getCacheFile(String name, int chapter, String platformName) { // name might look like "operator /=", so we need to escape it String safeName; try { safeName = URLEncoder.encode(name, "UTF-8"); // NOI18N } catch (UnsupportedEncodingException ex) { // UTF-8 should always be supported, but anyway... safeName = name; } return Places.getCacheSubfile("cnd/manpages/" + safeName + "." + platformName + "." + chapter); // NOI18N }
public static Dictionary getDictionary(String suffix, List<URL> sources) throws IOException { File trie = Places.getCacheSubfile("dict/dictionary" + suffix + ".trie" + CURRENT_TRIE_DICTIONARY_VERSION); return getDictionary(trie, sources); }
private File getCacheFile(Directive directive) { return Places.getCacheSubfile(new StringBuilder().append(CACHE_FOLDER_NAME).append('/').append(DOC_VERSION).append('/').append(directive.name()).toString()); }
File cacheFile = Places.getCacheSubfile(cache); long last = cacheFile.lastModified(); if (last <= 0) {
private File getCachedAPIFile() { if (apiFile != null) { return apiFile; } if (docFolder != null) { for (FileObject folder : Collections.list(docFolder.getFolders(false))) { FileObject fo = folder.getFileObject(API_ALL_JSON_FILE); if (fo != null) { apiFile = FileUtil.toFile(fo); return apiFile; } } } File cacheFile = Places.getCacheSubfile(docApiFilePath); return cacheFile; }
dis.close(); } catch (IOException ex) { Util.err.log(Level.FINE, "Cannot read " + Places.getCacheSubfile(CACHE), ex); map = null; osgi = null;