NetSurf
Macros | Functions
filename.h File Reference
#include <stdbool.h>
Include dependency graph for filename.h:
This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Macros

#define TEMP_FILENAME_PREFIX   "/tmp/WWW/NetSurf/Misc"
 

Functions

const char * filename_request (void)
 Request a new, unique, filename. More...
 
bool filename_claim (const char *filename)
 Claim a specific filename. More...
 
void filename_release (const char *filename)
 Releases a filename for future use. More...
 
bool filename_initialise (void)
 Initialise the filename provider. More...
 
void filename_flush (void)
 Deletes all files in the cache directory that are not accounted for. More...
 

Macro Definition Documentation

◆ TEMP_FILENAME_PREFIX

#define TEMP_FILENAME_PREFIX   "/tmp/WWW/NetSurf/Misc"

Definition at line 27 of file filename.h.

Function Documentation

◆ filename_claim()

bool filename_claim ( const char *  filename)

Claim a specific filename.

Parameters
filenamethe filename to claim
Returns
whether the claim was successful

Definition at line 115 of file filename.c.

References filename_create_directory(), directory::high_used, directory::low_used, and START_PREFIX.

Here is the call graph for this function:

◆ filename_flush()

void filename_flush ( void  )

Deletes all files in the cache directory that are not accounted for.

Definition at line 219 of file filename.c.

References filename_flush_directory(), and TEMP_FILENAME_PREFIX.

Here is the call graph for this function:

◆ filename_initialise()

bool filename_initialise ( void  )

Initialise the filename provider.

Definition at line 178 of file filename.c.

References NSLOG, nsmkdir, and TEMP_FILENAME_PREFIX.

Referenced by gui_init().

Here is the caller graph for this function:

◆ filename_release()

void filename_release ( const char *  filename)

Releases a filename for future use.

Parameters
filenamethe filename to release

Definition at line 151 of file filename.c.

References directory::high_used, directory::low_used, directory::next, directory::numeric_prefix, root, and START_PREFIX.

◆ filename_request()

const char * filename_request ( void  )

Request a new, unique, filename.

Returns
a pointer to a shared buffer containing the new filename, NULL on failure

Definition at line 68 of file filename.c.

References filename_buffer, filename_create_directory(), FULL_WORD, directory::high_used, directory::low_used, directory::next, NSLOG, directory::prefix, and root.

Referenced by nsbeos_gui_view_source(), and ro_gui_view_source().

Here is the call graph for this function:
Here is the caller graph for this function: