-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathio_util.h
34 lines (31 loc) · 964 Bytes
/
io_util.h
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
#ifndef O_IO_UTIL_H
#define O_IO_UTIL_H
#include <zlib.h>
#include "logging_util.h"
// FUNCTIONS
// Function Declarations
#ifdef __cplusplus
namespace dlib {
int my_system (const char *command, const char *executable="/bin/bash");
#else
int my_system (const char *command, const char *executable);
#endif
int isfile(char *fname); // True if file exists.
int bash_system(const char *command); // Call command with bash instead of sh
FILE *open_ofp(const char *outfname);
FILE *open_ifp(const char *infname);
int file_has_ext(char *fn, const char *ext);
int is_bgzipped_vcf(char *fn);
void check_popen(const char *cmd);
void check_call(const char *cmd);
#ifdef __cplusplus
gzFile open_gzfile(char *infname, const char *mode="r");
#else
gzFile open_gzfile(char *infname, const char *mode);
#endif
int count_lines(const char *fname);
int count_bed_lines(const char *fname);
#ifdef __cplusplus
}
#endif
#endif