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 35 36 37 38
|
/*****************************************************************************
fileType.h
(c) 2009 - Aaron Quinlan
Hall Laboratory
Department of Biochemistry and Molecular Genetics
University of Virginia
aaronquinlan@gmail.com
Licensed under the GNU General Public License 2.0 license.
******************************************************************************/
#ifndef FILETYPE_H
#define FILETYPE_H
#include <string>
#include <iostream>
#include <fstream>
#include <stdlib.h>
#include <string.h>
#include <errno.h>
#include <sys/stat.h>
#include <sys/types.h>
#include <unistd.h>
#include <sstream>
using namespace std;
/*****************************************************************************
Convenience functions to detect whether a given file is
"regular" and/or "gzipped".
Kindly contributed by Assaf Gordon.
******************************************************************************/
string string_error(int errnum);
bool isRegularFile(const string& filename);
bool isGzipFile(const string& filename);
#endif /* FILETYPE_H */
|