00001
00002
00003
00004
00005
00006
00007
00008
00009
00010
00011
00012
00013
00014
00015
00016
00017
00018
00019
00020
00021 #ifndef _BasicStreams_h
00022 #define _BasicStreams_h
00023
00024
00025 #include <string.h>
00026 #include <string>
00027
00028 #include <stdio.h>
00029 #include <iostream>
00030 #include <fstream>
00031
00032 using namespace std;
00033
00034
00035 #include "BasicEnums.h"
00036
00037
00038 void copyRestOfString(char* inchar, char* outchar, int startVal);
00039 string stringCopyRestOfString(string inchar, int startVal);
00040 string itos(int i);
00041
00042
00043
00044
00045
00046
00047
00048
00049
00050
00051
00052
00053
00054 bool output_file_open (string filename, ofstream & fout);
00055 bool input_file_open (string filename, ifstream & fin);
00056
00057
00058
00059
00060
00061
00062
00063
00064
00065 bool file_exists (string filename);
00066 bool file_exists (string filename, bool do_output);
00067
00068 int check_dirExists(string dname);
00069 int check_dirExists(char* dname);
00070
00071 void createDIR(char* makeDIR);
00072 void createDIR(string str_makeDir);
00073
00074
00075 int getListOfAllDirectoriesStartingWith(string localDirectory, string startStringOfDirectories, string*& arrayOfStrings);
00076 int getListOfAllFilesStartingWith(string localDirectory, string startStringOfDirectories, string*& arrayOfStrings);
00077
00078 int getListOfAllFilesByType_StartingWith(int type, string localDirectory, string startStringOfDirectories, string*& arrayOfStrings);
00079
00080
00081 int getNumberOfFilesWithStart(string fnDir, string startFilename);
00082 int getArrayOfFilesnamesWithStart(
00083 string fnIn,
00084 string startFilename,
00085 string*& allFilenames);
00086
00087 void deleteFile(string filename, bool doOutput);
00088
00089 #endif