Tor  0.4.7.0-alpha-dev
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.

Definition at line 289 of file files.c.

Field Documentation

◆ binary

unsigned binary

Did we open in binary mode?

Definition at line 293 of file files.c.

Referenced by fdopen_file().

◆ fd

int fd

fd for the open file.

Definition at line 294 of file files.c.

Referenced by fdopen_file().

◆ filename

char* filename

Name of the original file.

Definition at line 291 of file files.c.

◆ rename_on_close

unsigned rename_on_close

Are we using the temporary file or not?

Definition at line 292 of file files.c.

◆ stdio_file

FILE* stdio_file

stdio wrapper for fd.

Definition at line 295 of file files.c.

Referenced by fdopen_file().

◆ tempname

char* tempname

Name of the temporary file.

Definition at line 290 of file files.c.


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