소스 검색

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
+	}
+
 }