Lines Matching refs:tempfile
13 #include "android/utils/tempfile.h"
34 ** create the file with tempfile_create(), which returns a reference to a TempFile
37 ** you can then call tempfile_path() to retrieve the TempFile's real path to open
38 ** it. the returned path is owned by the TempFile object and should not be freed.
44 struct TempFile
47 TempFile* next;
51 static TempFile* _all_tempfiles;
53 TempFile*
56 TempFile* tempfile;
99 tempfile = malloc( sizeof(*tempfile) + strlen(tempname) + 1 );
100 tempfile->name = (char*)(tempfile + 1);
101 strcpy( (char*)tempfile->name, tempname );
103 tempfile->next = _all_tempfiles;
104 _all_tempfiles = tempfile;
106 if ( !tempfile->next ) {
110 return tempfile;
114 tempfile_path(TempFile* temp)
120 tempfile_close(TempFile* tempfile)
123 DeleteFile(tempfile->name);
125 unlink(tempfile->name);
192 TempFile* tempfile;
196 for (tempfile = _all_tempfiles; tempfile; tempfile = tempfile->next)
197 tempfile_close(tempfile);