NetSurf
filename.h
Go to the documentation of this file.
1/*
2 * Copyright 2006 Richard Wilson <info@tinct.net>
3 *
4 * This file is part of NetSurf, http://www.netsurf-browser.org/
5 *
6 * NetSurf is free software; you can redistribute it and/or modify
7 * it under the terms of the GNU General Public License as published by
8 * the Free Software Foundation; version 2 of the License.
9 *
10 * NetSurf is distributed in the hope that it will be useful,
11 * but WITHOUT ANY WARRANTY; without even the implied warranty of
12 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
13 * GNU General Public License for more details.
14 *
15 * You should have received a copy of the GNU General Public License
16 * along with this program. If not, see <http://www.gnu.org/licenses/>.
17 */
18
19#ifndef _NETSURF_UTILS_FILENAME_H_
20#define _NETSURF_UTILS_FILENAME_H_
21
22#include <stdbool.h>
23
24#ifdef __riscos__
25#define TEMP_FILENAME_PREFIX "<Wimp$ScrapDir>/WWW/NetSurf/Misc"
26#else
27#define TEMP_FILENAME_PREFIX "/tmp/WWW/NetSurf/Misc"
28#endif
29
30const char *filename_request(void);
31bool filename_claim(const char *filename);
32void filename_release(const char *filename);
33bool filename_initialise(void);
34void filename_flush(void);
35
36#endif
void filename_release(const char *filename)
Releases a filename for future use.
Definition: filename.c:151
const char * filename_request(void)
Request a new, unique, filename.
Definition: filename.c:68
void filename_flush(void)
Deletes all files in the cache directory that are not accounted for.
Definition: filename.c:219
bool filename_claim(const char *filename)
Claim a specific filename.
Definition: filename.c:115
bool filename_initialise(void)
Initialise the filename provider.
Definition: filename.c:178