Lines Matching defs:filename
56 WCHAR filename[MAX_PATH];
57 DWORD filename_length = GetModuleFileNameW(mod, filename, ARRAY_SIZE(filename));
59 if (filename_length == 0 || filename_length == ARRAY_SIZE(filename))
63 filename,
291 char *filename = e->lru_name;
292 if (asprintf(&e->lru_name, "%s/%s", dir_path, filename) < 0)
295 free(filename);
481 disk_cache_evict_item(struct disk_cache *cache, char *filename)
484 if (stat(filename, &sb) == -1) {
485 free(filename);
489 unlink(filename);
490 free(filename);
570 disk_cache_load_item(struct disk_cache *cache, char *filename, size_t *size)
574 int fd = open(filename, O_RDONLY | O_CLOEXEC);
597 free(filename);
605 if (filename)
606 free(filename);
613 /* Return a filename within the cache's directory corresponding to 'key'.
621 char *filename;
627 if (asprintf(&filename, "%s/%c%c/%s", cache->path, buf[0],
631 return filename;
701 char *filename)
708 * final destination filename, (to prevent any readers from seeing
712 if (asprintf(&filename_tmp, "%s.tmp", filename) == -1)
754 fd_final = open(filename, O_RDONLY | O_CLOEXEC);
770 * rename them atomically to the destination filename, and also
779 ret = rename(filename_tmp, filename);
786 if (stat(filename, &sb) == -1) {
788 unlink(filename);