51 return &storage.
cache;
58 if (!user_config_dir.has_value()) {
64 return std::string(filepath);
86 values.
append({item.value, item.key});
88 std::sort(values.begin(), values.end());
91 for (
const auto &item : values) {
92 file.write(item.second.data(), item.second.size());
114 while (std::getline(file, line)) {
#define BLENDER_RECENT_SEARCHES_FILE
std::optional< std::string > BKE_appdir_folder_id_create(int folder_id, const char *subfolder) ATTR_WARN_UNUSED_RESULT
File and directory operations.
int BLI_exists(const char *path) ATTR_WARN_UNUSED_RESULT ATTR_NONNULL()
File and directory operations.
#define BLI_path_join(...)
@ USER_FLAG_RECENT_SEARCHES_DISABLE
bool add_overwrite(const Key &key, const Value &value)
ItemIterator items() const
void append(const T &value)
static RecentCacheStorage & get_recent_cache_storage()
void add_recent_search(StringRef chosen_str)
void read_recent_searches_file()
void write_recent_searches_file()
static std::optional< std::string > get_recent_searches_file_path()
const blender::string_search::RecentCache * get_recent_cache_or_null()
Map< std::string, int > logical_time_by_str