dpkg 1.22.7-3-g89f48
Loading...
Searching...
No Matches
Data Structures | Enumerations | Functions
file.h File Reference

(9d410b391)

#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

void file_getcwd (struct varbuf *cwd)
 Get the current working directory.
 
ssize_t file_readlink (const char *slink, struct varbuf *content, size_t content_len)
 Read the symlink content into a varbuf.
 
bool file_is_exec (const char *filename)
 Check whether a filename is executable.
 
void file_copy_perms (const char *src, const char *dst)
 Copy file ownership and permissions from one file to another.
 
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.
 
void file_lock (int *lockfd, enum file_lock_flags flags, const char *filename, const char *filedesc)
 Lock a file.
 
void file_unlock (int fd, const char *filename, const char *filedesc)
 Unlock a previously locked file.
 
void file_show (const char *filename)