2 * Prototypes for finlib directory of Bacula
7 Copyright (C) 2000-2003 Kern Sibbald and John Walker
9 This program is free software; you can redistribute it and/or
10 modify it under the terms of the GNU General Public License as
11 published by the Free Software Foundation; either version 2 of
12 the License, or (at your option) any later version.
14 This program is distributed in the hope that it will be useful,
15 but WITHOUT ANY WARRANTY; without even the implied warranty of
16 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
17 General Public License for more details.
19 You should have received a copy of the GNU General Public
20 License along with this program; if not, write to the Free
21 Software Foundation, Inc., 59 Temple Place - Suite 330, Boston,
27 void encode_stat (char *buf, struct stat *statp, uint32_t LinkFI);
28 void decode_stat (char *buf, struct stat *statp, uint32_t *LinkFI);
29 int encode_attribsEx (void *jcr, char *attribsEx, FF_PKT *ff_pkt);
30 int set_attributes(void *jcr, char *fname, char *ofile, char *lname,
31 int type, int stream, struct stat *statp,
32 char *attribsEx, BFILE *ofd);
33 void SetServicePrivileges(void *jcr);
35 /* from create_file.c */
36 int create_file(void *jcr, char *fname, char *ofile, char *lname,
37 int type, int stream, struct stat *statp,
38 char *attribsEx, BFILE *ofd, int replace, int win_io);
41 FF_PKT *init_find_files();
42 void set_find_options(FF_PKT *ff, int incremental, time_t mtime);
43 int find_files(JCR *jcr, FF_PKT *ff, int sub(FF_PKT *ff_pkt, void *hpkt), void *pkt);
44 int term_find_files(FF_PKT *ff);
47 void init_include_exclude_files(FF_PKT *ff);
48 void term_include_exclude_files(FF_PKT *ff);
49 void add_fname_to_include_list(FF_PKT *ff, int prefixed, char *fname);
50 void add_fname_to_exclude_list(FF_PKT *ff, char *fname);
51 int file_is_excluded(FF_PKT *ff, char *file);
52 int file_is_included(FF_PKT *ff, char *file);
53 struct s_included_file *get_next_included_file(FF_PKT *ff,
54 struct s_included_file *inc);
57 int find_one_file(JCR *jcr, FF_PKT *ff, int handle_file(FF_PKT *ff_pkt, void *hpkt),
58 void *pkt, char *p, dev_t parent_device, int top_level);
59 int term_find_one(FF_PKT *ff);
63 int make_path(void *jcr, const char *argpath, int mode,
64 int parent_mode, uid_t owner, gid_t group,
65 int preserve_existing, char *verbose_fmt_string);
68 ssize_t bread(BFILE *bfd, void *buf, size_t count);
69 int bopen(BFILE *bfd, const char *fname, int flags, mode_t mode);
70 int bclose(BFILE *bfd);
71 ssize_t bread(BFILE *bfd, void *buf, size_t count);
72 ssize_t bwrite(BFILE *bfd, void *buf, size_t count);
73 off_t blseek(BFILE *bfd, off_t offset, int whence);
74 int is_bopen(BFILE *bfd);
75 void binit(BFILE *bfd, int use_win_api);
76 char *berror(BFILE *bfd);