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