CernVM-FS  2.12.0
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Pages
fs_traversal_interface.h
Go to the documentation of this file.
1 
4 #ifndef CVMFS_SHRINKWRAP_FS_TRAVERSAL_INTERFACE_H_
5 #define CVMFS_SHRINKWRAP_FS_TRAVERSAL_INTERFACE_H_
6 
7 #include "libcvmfs.h"
8 
9 #define COPY_BUFFER_SIZE 4096
10 
12  uint64_t version;
13  uint64_t size;
14 
15  char *repo;
16  char *base;
17  char *data;
18  char *config;
19  char *lib_version;
20 
21  void * ctx;
22 };
23 
28 };
29 
30 struct fs_traversal {
37 
49  struct fs_traversal_context *(*initialize)(
50  const char *repo,
51  const char *base,
52  const char *data,
53  const char *config,
54  int num_threads);
55 
65  void (*finalize)(struct fs_traversal_context *ctx);
66 
75  struct fs_traversal_context *dest);
76 
87  const char *dir,
88  char ***buf,
89  size_t *len);
90 
116  const char *path, struct cvmfs_attr *stat, bool get_hash);
117 
135  const struct cvmfs_attr *stat);
136 
148  const char *path, const struct cvmfs_attr *stat);
149 
161  char *(*get_identifier)(struct fs_traversal_context *ctx,
162  const struct cvmfs_attr *stat);
163 
164 
175  const char *identifier);
176 
197  const char *path,
198  const char *identifier);
199 
212  const char *path);
213 
228  const char *path,
229  const struct cvmfs_attr *stat);
230 
242  const char *path);
243 
256  const struct cvmfs_attr *stat);
257 
268  void *(*get_handle)(struct fs_traversal_context *ctx,
269  const char *identifier);
270 
271 
292  const char *src,
293  const char *dest,
294  const struct cvmfs_attr *stat_info);
295 
309 
318  int (*do_fopen)(void *file_ctx, fs_open_type op_mode);
319 
329  int (*do_fclose)(void *file_ctx);
330 
341  int (*do_fread)(void *file_ctx, char *buff, size_t len, size_t *read_len);
342 
352  int (*do_fwrite)(void *file_ctx, const char *buff, size_t len);
353 
357  void (*do_ffree)(void *file_ctx);
358 };
359 
360 #endif // CVMFS_SHRINKWRAP_FS_TRAVERSAL_INTERFACE_H_
struct cvmcache_context * ctx
int(* do_fopen)(void *file_ctx, fs_open_type op_mode)
int(* set_meta)(struct fs_traversal_context *ctx, const char *path, const struct cvmfs_attr *stat)
bool(* is_hash_consistent)(struct fs_traversal_context *ctx, const struct cvmfs_attr *stat)
int(* do_unlink)(struct fs_traversal_context *ctx, const char *path)
int(* garbage_collector)(struct fs_traversal_context *ctx)
int(* do_rmdir)(struct fs_traversal_context *ctx, const char *path)
void(* do_ffree)(void *file_ctx)
int(* touch)(struct fs_traversal_context *ctx, const struct cvmfs_attr *stat)
int(* do_symlink)(struct fs_traversal_context *ctx, const char *src, const char *dest, const struct cvmfs_attr *stat_info)
void(* finalize)(struct fs_traversal_context *ctx)
int(* do_link)(struct fs_traversal_context *ctx, const char *path, const char *identifier)
void(* list_dir)(struct fs_traversal_context *ctx, const char *dir, char ***buf, size_t *len)
void(* archive_provenance)(struct fs_traversal_context *src, struct fs_traversal_context *dest)
bool(* has_file)(struct fs_traversal_context *ctx, const char *identifier)
int(* do_fclose)(void *file_ctx)
int(* get_stat)(struct fs_traversal_context *ctx, const char *path, struct cvmfs_attr *stat, bool get_hash)
int(* do_fwrite)(void *file_ctx, const char *buff, size_t len)
int(* do_fread)(void *file_ctx, char *buff, size_t len, size_t *read_len)
int(* do_mkdir)(struct fs_traversal_context *ctx, const char *path, const struct cvmfs_attr *stat)
struct fs_traversal_context * context_