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 11#include "IO/FileInfo.h"
2+ #include "IO/Directory.h"
23#include "IO/StreamReader.h"
34#include "IO/StreamWriter.h"
45#include "IO/FileNotFoundException.h"
Original file line number Diff line number Diff line change 33
44#include " System/String.h"
55#include " System/IO.h"
6+ #include " System/IO/FileSystemInfo.h"
67
78namespace System
89{
@@ -12,15 +13,27 @@ namespace System
1213 // / determine if the file exists
1314 static void CreateDirectory (const System::String& file)
1415 {
15- static_cast <void >(file);
16+ mkdir (file.str ().c_str (),
17+ S_IRWXU | S_IRWXG | S_IROTH | S_IXOTH);
1618 }
1719
1820 static void Delete (const System::String& file)
1921 {
20- static_cast < void > (file);
22+ rmdir (file. str (). c_str () );
2123 }
2224
2325 };
26+
27+ class DirectoryInfo : public FileSystemInfo
28+ {
29+ public:
30+ DirectoryInfo ()
31+ {}
32+
33+ DirectoryInfo (const System::String & dir):
34+ FileSystemInfo (dir)
35+ {}
36+ };
2437}
2538
2639using namespace System ;
Original file line number Diff line number Diff line change @@ -49,6 +49,7 @@ add_executable(System_Test
4949 HashSet_Test.cxx
5050 StringBuilder_Test.cxx
5151 Xml_Test.cxx
52+ Directory_Test.cxx
5253 )
5354
5455# alter the link line of gcc to include coverage library
You can’t perform that action at this time.
0 commit comments