dpkg 1.21.11
Data Structures | Enumerations | Functions
file.h File Reference

(6df548cb1)

#include <sys/types.h>
#include <stdbool.h>
#include <dpkg/macros.h>
#include <dpkg/error.h>
#include <dpkg/varbuf.h>
Include dependency graph for file.h:
This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Data Structures

struct  file_stat
 

Enumerations

enum  file_lock_flags { FILE_LOCK_NOWAIT , FILE_LOCK_WAIT }
 

Functions

bool file_is_exec (const char *filename)
 Check whether a filename is executable. More...
 
void file_copy_perms (const char *src, const char *dst)
 Copy file ownership and permissions from one file to another. More...
 
int file_slurp (const char *filename, struct varbuf *vb, struct dpkg_error *err)
 
bool file_is_locked (int lockfd, const char *filename)
 Check if a file has a lock acquired. More...
 
void file_lock (int *lockfd, enum file_lock_flags flags, const char *filename, const char *filedesc)
 Lock a file. More...
 
void file_unlock (int fd, const char *filename, const char *filedesc)
 Unlock a previously locked file. More...
 
void file_show (const char *filename)