瀏覽代碼

added createDirectory

ncannasse 10 年之前
父節點
當前提交
90d0a87db4
共有 1 個文件被更改,包括 10 次插入0 次删除
  1. 10 0
      hxd/File.hx

+ 10 - 0
hxd/File.hx

@@ -235,4 +235,14 @@ class File {
 		#end
 	}
 
+	public static function createDirectory( path : String ) {
+		#if air3
+		getRelPath(path).createDirectory();
+		#elseif sys
+		sys.FileSystem.createDirectory(path);
+		#else
+		throw "Not supported";
+		#end
+	}
+
 }