tor  master
Data Fields
open_file_t Struct Reference

Data Fields

char * tempname
 
char * filename
 
unsigned rename_on_close:1
 
unsigned binary:1
 
int fd
 
FILE * stdio_file
 

Detailed Description

Represents a file that we're writing to, with support for atomic commit: we can write into a temporary file, and either remove the file on failure, or replace the original file on success.

Field Documentation

◆ binary

unsigned binary

Did we open in binary mode?

◆ fd

int fd

fd for the open file.

◆ filename

char* filename

Name of the original file.

◆ rename_on_close

unsigned rename_on_close

Are we using the temporary file or not?

◆ stdio_file

FILE* stdio_file

stdio wrapper for fd.

◆ tempname

char* tempname

Name of the temporary file.


The documentation for this struct was generated from the following file: