cbp2make
Makefile generation tool for Code::Blocks IDE
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Pages
stlfutils.h
Go to the documentation of this file.
1 /*
2  cbp2make : Makefile generation tool for the Code::Blocks IDE
3  Copyright (C) 2010-2013 Mirai Computing (mirai.computing@gmail.com)
4 
5  This program is free software: you can redistribute it and/or modify
6  it under the terms of the GNU General Public License as published by
7  the Free Software Foundation, either version 3 of the License, or
8  (at your option) any later version.
9 
10  This program is distributed in the hope that it will be useful,
11  but WITHOUT ANY WARRANTY; without even the implied warranty of
12  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
13  GNU General Public License for more details.
14 
15  You should have received a copy of the GNU General Public License
16  along with this program. If not, see <http://www.gnu.org/licenses/>.
17 */
18 
19 //------------------------------------------------------------------------------
20 #ifndef STL_FUTILS_H
21 #define STL_FUTILS_H
22 //------------------------------------------------------------------------------
23 #include "macros.h"
24 #ifdef OS_WIN
25 #include <io.h>
26 #endif
27 //------------------------------------------------------------------------------
28 #include "stlstrings.h"
29 //------------------------------------------------------------------------------
30 char PathDelimiter(void);
32 CString ChangeFileExt(const CString& FileName, const CString& FileExt);
33 CString ExtractFilePath(const CString& FilePathName);
34 CString ExtractFileName(const CString& FilePathName);
35 CString ExtractFileExt(const CString& FilePathName);
36 void SplitFilePathName(const CString& FilePathName, CString& FilePath, CString& FileName, CString& FileExt);
37 CString MakeUnixPath(const CString& FilePathName);
38 CString MakeWindowsPath(const CString& FilePathName);
39 CString MakeNativePath(const CString& FilePathName);
40 CString RemoveLeadingPathDelimiter(const CString& FilePathName);
41 CString IncludeLeadingPathDelimiter(const CString& FilePathName);
42 CString RemoveTrailingPathDelimiter(const CString& FilePathName);
43 CString IncludeTrailingPathDelimiter(const CString& FilePathName);
44 CString QuoteSpaces(const CString& FilePathName, const int QuoteMode = 0);
45 CString JoinPaths(const CString& HeadPath, const CString& TailPath, const char Separator = PathDelimiter());
46 
47 bool FileExists(const CString& FileName);
48 bool DirExists(const CString& FileName);
49 bool MakeDir(const CString& DirPath, int DirMode = 0755);
50 CString RootDirPath(void);
51 CString HomeDirPath(void);
52 CString TempDirPath(void);
53 
55 bool ChangeDir(const CString& DirPath);
56 //------------------------------------------------------------------------------
57 #endif