ftwin 0.8.10
ft_file.h
Go to the documentation of this file.
1
6/*
7 *
8 * Copyright (C) 2007 François Pesce : francois.pesce (at) gmail (dot) com
9 *
10 * Licensed under the Apache License, Version 2.0 (the "License");
11 * you may not use this file except in compliance with the License.
12 * You may obtain a copy of the License at
13 *
14 * http://www.apache.org/licenses/LICENSE-2.0
15 *
16 * Unless required by applicable law or agreed to in writing, software
17 * distributed under the License is distributed on an "AS IS" BASIS,
18 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
19 * See the License for the specific language governing permissions and
20 * limitations under the License.
21 */
22
23#ifndef FT_FILE_H
24#define FT_FILE_H
25
26#include <apr_pools.h>
27
28#define FTWIN_MIN(a,b) ((a)<(b)) ? (a) : (b)
29
30#include "checksum.h"
31
46apr_status_t checksum_file(const char *filename, apr_off_t size, apr_off_t excess_size, ft_hash_t *hash_out,
47 apr_pool_t *gc_pool);
48
64apr_status_t filecmp(apr_pool_t *pool, const char *fname1, const char *fname2, apr_off_t size, apr_off_t excess_size,
65 int *result_out);
66
67#endif /* FT_FILE_H */
Defines the core checksum type used throughout the application.
apr_status_t checksum_file(const char *filename, apr_off_t size, apr_off_t excess_size, ft_hash_t *hash_out, apr_pool_t *gc_pool)
Calculates the XXH128 checksum of a file.
Definition ft_file.c:134
apr_status_t filecmp(apr_pool_t *pool, const char *fname1, const char *fname2, apr_off_t size, apr_off_t excess_size, int *result_out)
Compares two files byte-by-byte to determine if they are identical.
Definition ft_file.c:285
The return value from 128-bit hashes.
Definition xxhash.h:1239