71               const char *filedesc);
 
   72void file_unlock(
int fd, 
const char *filename, 
const char *filedesc);
 
void file_unlock(int fd, const char *filename, const char *filedesc)
Unlock a previously locked file.
Definition file.c:176
 
void file_getcwd(struct varbuf *cwd)
Get the current working directory.
Definition file.c:45
 
bool file_is_exec(const char *filename)
Check whether a filename is executable.
Definition file.c:81
 
void file_lock(int *lockfd, enum file_lock_flags flags, const char *filename, const char *filedesc)
Lock a file.
Definition file.c:231
 
ssize_t file_readlink(const char *slink, struct varbuf *content, size_t content_len)
Read the symlink content into a varbuf.
Definition file.c:59
 
file_lock_flags
Definition file.h:64
 
void file_copy_perms(const char *src, const char *dst)
Copy file ownership and permissions from one file to another.
Definition file.c:101
 
void file_show(const char *filename)
Definition file.c:274
 
bool file_is_locked(int lockfd, const char *filename)
Check if a file has a lock acquired.
Definition file.c:206
 
int file_slurp(const char *filename, struct varbuf *vb, struct dpkg_error *err)
Definition file.c:144
 
@ FILE_LOCK_WAIT
Definition file.h:66
 
@ FILE_LOCK_NOWAIT
Definition file.h:65
 
#define DPKG_BEGIN_DECLS
Definition macros.h:164
 
#define DPKG_END_DECLS
Definition macros.h:165
 
char * uname
Definition file.h:47
 
gid_t gid
Definition file.h:42
 
uid_t uid
Definition file.h:41
 
char * gname
Definition file.h:48
 
mode_t mode
Definition file.h:43
 
varbuf_init must be called exactly once before the use of each varbuf (including before any call to v...
Definition varbuf.h:56