mirror of
https://github.com/fscotto/fsnap.git
synced 2026-11-26 03:09:51 +00:00
17 lines
505 B
C
17 lines
505 B
C
#ifndef UTILITY_H
|
|
#define UTILITY_H
|
|
|
|
/* Concatenate src with n additional strings. Returns a newly allocated
|
|
string, or NULL on allocation failure. */
|
|
char *strconcat(const char *src, int n, ...);
|
|
|
|
/* Resolve path to an absolute canonical form. Returns a newly allocated
|
|
string, or NULL on failure (errno set by realpath). */
|
|
char *resolve_path(const char *path);
|
|
|
|
/* Copy file contents from src to dst.
|
|
Returns 0 on success, -1 on failure. */
|
|
int copy(const char *src, const char *dst);
|
|
|
|
#endif
|