diff options
author | Jörg Frings-Fürst <debian@jff-webhosting.net> | 2015-02-04 14:09:54 +0100 |
---|---|---|
committer | Jörg Frings-Fürst <debian@jff-webhosting.net> | 2015-02-04 14:09:54 +0100 |
commit | bd82d030011cd8b9655e5ded6b6df9343b42a6bd (patch) | |
tree | de82d886dfea0cb7dbb6e80436218a25cb211bc3 /include/libHX/io.h |
Imported Upstream version 3.22upstream/3.22
Diffstat (limited to 'include/libHX/io.h')
-rw-r--r-- | include/libHX/io.h | 46 |
1 files changed, 46 insertions, 0 deletions
diff --git a/include/libHX/io.h b/include/libHX/io.h new file mode 100644 index 0000000..c86af72 --- /dev/null +++ b/include/libHX/io.h @@ -0,0 +1,46 @@ +#ifndef _LIBHX_IO_H +#define _LIBHX_IO_H 1 + +#include <sys/types.h> + +#ifdef __cplusplus +extern "C" { +#endif + +#ifndef __libhx_internal_hxmc_t_defined +#define __libhx_internal_hxmc_t_defined 1 +typedef char hxmc_t; +#endif + +enum { + HXF_UID = 1 << 0, + HXF_GID = 1 << 1, + HXF_KEEP = 1 << 2, + HX_REALPATH_NOFLAGS = 0, + HX_REALPATH_ABSOLUTE = 1 << 0, + HX_REALPATH_SELF = 1 << 1, + HX_REALPATH_PARENT = 1 << 2, + /* HX_REALPATH_SYMLINK = 1 << 3, removed in v3.13, thus blocked */ + HX_REALPATH_DEFAULT = HX_REALPATH_SELF | HX_REALPATH_PARENT, +}; + +struct HXdir; + +extern struct HXdir *HXdir_open(const char *); +extern const char *HXdir_read(struct HXdir *); +extern void HXdir_close(struct HXdir *); +extern int HX_copy_dir(const char *, const char *, unsigned int, ...); +extern int HX_copy_file(const char *, const char *, unsigned int, ...); +extern int HX_mkdir(const char *, unsigned int); +extern int HX_readlink(hxmc_t **, const char *); +extern int HX_realpath(hxmc_t **, const char *, unsigned int); +extern int HX_rrmdir(const char *); + +extern ssize_t HXio_fullread(int, void *, size_t); +extern ssize_t HXio_fullwrite(int, const void *, size_t); + +#ifdef __cplusplus +} /* extern "C" */ +#endif + +#endif /* _LIBHX_IO_H */ |