File tree Expand file tree Collapse file tree 3 files changed +17
-2
lines changed Expand file tree Collapse file tree 3 files changed +17
-2
lines changed Original file line number Diff line number Diff line change 1
1
#include "IO/FileInfo.h"
2
+ #include "IO/Directory.h"
2
3
#include "IO/StreamReader.h"
3
4
#include "IO/StreamWriter.h"
4
5
#include "IO/FileNotFoundException.h"
Original file line number Diff line number Diff line change 3
3
4
4
#include " System/String.h"
5
5
#include " System/IO.h"
6
+ #include " System/IO/FileSystemInfo.h"
6
7
7
8
namespace System
8
9
{
@@ -12,15 +13,27 @@ namespace System
12
13
// / determine if the file exists
13
14
static void CreateDirectory (const System::String& file)
14
15
{
15
- static_cast <void >(file);
16
+ mkdir (file.str ().c_str (),
17
+ S_IRWXU | S_IRWXG | S_IROTH | S_IXOTH);
16
18
}
17
19
18
20
static void Delete (const System::String& file)
19
21
{
20
- static_cast < void > (file);
22
+ rmdir (file. str (). c_str () );
21
23
}
22
24
23
25
};
26
+
27
+ class DirectoryInfo : public FileSystemInfo
28
+ {
29
+ public:
30
+ DirectoryInfo ()
31
+ {}
32
+
33
+ DirectoryInfo (const System::String & dir):
34
+ FileSystemInfo (dir)
35
+ {}
36
+ };
24
37
}
25
38
26
39
using namespace System ;
Original file line number Diff line number Diff line change @@ -49,6 +49,7 @@ add_executable(System_Test
49
49
HashSet_Test.cxx
50
50
StringBuilder_Test.cxx
51
51
Xml_Test.cxx
52
+ Directory_Test.cxx
52
53
)
53
54
54
55
# alter the link line of gcc to include coverage library
You can’t perform that action at this time.
0 commit comments