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 273 of file files.c.

Field Documentation

◆ binary

unsigned open_file_t::binary

Did we open in binary mode?

Definition at line 277 of file files.c.

Referenced by fdopen_file().

◆ fd

int open_file_t::fd

fd for the open file.

Definition at line 278 of file files.c.

Referenced by fdopen_file().

◆ filename

char* open_file_t::filename

Name of the original file.

Definition at line 275 of file files.c.

◆ rename_on_close

unsigned open_file_t::rename_on_close

Are we using the temporary file or not?

Definition at line 276 of file files.c.

◆ stdio_file

FILE* open_file_t::stdio_file

stdio wrapper for fd.

Definition at line 279 of file files.c.

Referenced by fdopen_file().

◆ tempname

char* open_file_t::tempname

Name of the temporary file.

Definition at line 274 of file files.c.

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