]> Creatis software - cpPlugins.git/blob - lib/cpPlugins/OS/FileSystem.h
yet another refactoring
[cpPlugins.git] / lib / cpPlugins / OS / FileSystem.h
1 #ifndef __cpPlugins__OS__FileSystem__h__
2 #define __cpPlugins__OS__FileSystem__h__
3
4 #include <cpPlugins/Config.h>
5 #include <set>
6
7 namespace cpPlugins
8 {
9   namespace OS
10   {
11     /**
12      */
13     class cpPlugins_EXPORT FileSystem
14     {
15     public:
16       typedef FileSystem Self;
17
18     public:
19       /**
20        */
21       static std::string CanonicalPath( const std::string& path );
22
23       /**
24        */
25       static std::pair< std::string, std::string > SplitPath(
26         const std::string& path
27         );
28
29       /**
30        */
31       static std::set< std::string > LoadDirContents(
32         const std::string& path, bool recursive = false,
33         const std::string& pattern = ""
34         );
35
36       /**
37        */
38       static int GlobMatch( const char* target, const char* pattern );
39
40       /**
41        */
42       static bool Glob( const std::string& line, const std::string& pattern );
43
44       /**
45        */
46       static bool Read( std::string& buffer, const std::string& fname );
47
48       /**
49        */
50       static bool Write( const std::string& buffer, const std::string& fname );
51     };
52
53   } // ecapseman
54
55 } // ecapseman
56
57 #endif // __cpPlugins__OS__FileSystem__h__
58
59 // eof - $RCSfile$