Debian Codegraph @

mydir-unix.h

raw
1 /* BaitFisher (version 1.2.7) a program for designing DNA target enrichment baits
2 * Copyright 2013-2016 by Christoph Mayer
3 *
4 * This source file is part of the BaitFisher-package.
5 *
6 * This program is free software: you can redistribute it and/or modify
7 * it under the terms of the GNU General Public License as published by
8 * the Free Software Foundation, either version 3 of the License, or
9 * (at your option) any later version.
10 *
11 * This program is distributed in the hope that it will be useful,
12 * but WITHOUT ANY WARRANTY; without even the implied warranty of
13 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
14 * GNU General Public License for more details.
15 *
16 * You should have received a copy of the GNU General Public License
17 * along with BaitFisher. If not, see <http://www.gnu.org/licenses/>.
18 *
19 *
20 * For any enquiries send an Email to Christoph Mayer
21 * [email protected]
22 *
23 * When publishing work that is based on the results please cite:
24 * Mayer et al. 2016: BaitFisher: A software package for multi-species target DNA enrichment probe design
25 *
26 */
27 #ifndef MYDIR_H
28 #define MYDIR_H
29
30 #include "faststring2.h"
31
32
33 bool file_exists(const char *);
34 bool file_or_dir_exists(const char *);
35 bool move_file_or_dir(const char*, const char *);
36
37 bool make_directory(const char *);
38 bool change_dir(const char *);
39
40 faststring next_unique_file_or_dir_name(faststring, unsigned *z=NULL);
41 void next_file_name_in_series(faststring &, unsigned *z=NULL);
42
43 faststring get_working_directory();
44 faststring get_working_directory2(char *);
45
46 bool get_file_names_in_dir(std::list<faststring>&, faststring &path_name);
47 bool get_file_names_in_dir(std::list<faststring>&, faststring &path_name, faststring &extension_filter);
48 bool get_file_names_in_dir(std::list<faststring>&, faststring &path_name, std::list<faststring> &extension_filter);
49
50 long long get_file_size(faststring path_name);
51 int file_or_dir_type(const char *fname);
52
53 //faststring pwd();
54
55 #endif
56
57