File tree Expand file tree Collapse file tree 2 files changed +23
-10
lines changed Expand file tree Collapse file tree 2 files changed +23
-10
lines changed Original file line number Diff line number Diff line change @@ -44,3 +44,23 @@ Array<System::IO::FileInfo> System::IO::DirectoryInfo::GetFiles()
44
44
#endif
45
45
return files.ToArray ();
46
46
}
47
+
48
+ void Directory::CreateDirectory (const System::String& file)
49
+ {
50
+ #ifdef SUPPORT_DIRENT
51
+ mkdir (file.c_str (),
52
+ S_IRWXU | S_IRWXG | S_IROTH | S_IXOTH);
53
+ #else
54
+ ::CreateDirectory (file.c_str(),nullptr);
55
+ #endif
56
+ }
57
+
58
+ // / delete a named directory
59
+ void Directory::Delete (const System::String& file)
60
+ {
61
+ #ifdef SUPPORT_DIRENT
62
+ rmdir (file.c_str ());
63
+ #else
64
+ ::RemoveDirectory (file.c_str());
65
+ #endif
66
+ }
Original file line number Diff line number Diff line change @@ -20,18 +20,11 @@ namespace System
20
20
{
21
21
public:
22
22
// / determine if the file exists
23
- static void CreateDirectory (const System::String& file)
24
- {
25
- mkdir (file.str ().c_str (),
26
- S_IRWXU | S_IRWXG | S_IROTH | S_IXOTH);
27
- }
23
+ static void CreateDirectory (const System::String& file);
28
24
29
25
// / delete a named directory
30
- static void Delete (const System::String& file)
31
- {
32
- rmdir (file.str ().c_str ());
33
- }
34
-
26
+ static void Delete (const System::String& file);
27
+
35
28
};
36
29
37
30
// / directory info class
You can’t perform that action at this time.
0 commit comments