Files
FastSync/src/shared/metadata.h
T
TapTap c2ddda26ad
CI / lint (pull_request) Failing after 7s
CI / build-and-test (pull_request) Has been skipped
CI / sanitizers (address) (pull_request) Has been skipped
CI / sanitizers (undefined) (pull_request) Has been skipped
CI / fuzz-build (pull_request) Has been skipped
CI / coverage (pull_request) Has been skipped
CI / valgrind (pull_request) Has been skipped
fix: refactoring and portability — issues #61, #51, #52
2026-07-20 18:58:48 +02:00

18 lines
498 B
C

#ifndef METADATA_H
#define METADATA_H
#include "file.h"
#include <stdbool.h>
#include <stdint.h>
#include <sys/stat.h>
#define FILE_METADATA_WIRE_SIZE (sizeof(int32_t) * 3 + sizeof(int64_t) * 2)
void metadata_to_buf(char** buf, const FileMetadata* m);
FileMetadata* metadata_from_buf(char** buf);
bool metadata_send(int file_descriptor, FileMetadata* m);
FileMetadata* metadata_receive(int file_descriptor, int* ok);
void file_restore_metadata(const char* path, FileMetadata* metadata);
#endif