-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathFileUtils.h
More file actions
23 lines (19 loc) · 851 Bytes
/
FileUtils.h
File metadata and controls
23 lines (19 loc) · 851 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
// $Id: FileUtils.h,v 1.4 2009/06/24 18:01:15 samn Exp $
#ifndef FILE_UTILS_H
#define FILE_UTILS_H
#include <string>
#include <vector>
std::string GetFileExt(std::string& strPath);
CString GetFileExt(CString& strPath);
std::string GetFileName(std::string& strPath,bool bGetExt);
CString GetFileName(CString& strPath,bool bGetExt);
CString GetFilePath(CString& strPath,bool bGetExt);
CString GetDir(CString& strFilePath);
bool GetLines(FILE* fp,std::vector<std::string>& vstr);
bool GetLines(char* fname,std::vector<std::string>& vstr);
bool FileExists(const char* fname);
long FileSize(const char* fname);
//path is directory, ext is file type extension, vfiles will have full path of each file found
//returns true on success
bool GetFilesInDir(std::string& path,std::string& ext,std::vector<std::string>& vfiles);
#endif