mirror of
https://github.com/fscotto/fsnap.git
synced 2026-11-26 11:19:52 +00:00
Hash the followed target content with CRC-32 (hash.c/hash.h) and emit a FINGERPRINT field for non-directory records in create.c. Schema: TYPE|MODE|UID|GID|MTIME|SIZE|FINGERPRINT|TARGET per SPEC §17/§18.
26 lines
321 B
C
26 lines
321 B
C
#ifndef TYPE_H
|
|
#define TYPE_H
|
|
|
|
enum Fields {
|
|
FILE_TYPE,
|
|
PERMISSIONS,
|
|
UID,
|
|
GID,
|
|
SIZE,
|
|
TIME,
|
|
TARGET,
|
|
FINGERPRINT,
|
|
PATH,
|
|
NONE,
|
|
};
|
|
|
|
extern enum Fields field;
|
|
|
|
const char *field_name(enum Fields f);
|
|
|
|
struct RecordObject;
|
|
struct RecordObject *unpack(char *s);
|
|
int release(struct RecordObject *obj);
|
|
|
|
#endif
|