Add ProjectXMLParser.fromFile for consistency

This commit is contained in:
Joshua Granick
2017-05-17 17:12:50 -07:00
parent dba0a604b6
commit ab8c6f0efb

View File

@@ -373,6 +373,21 @@ class ProjectXMLParser extends HXProject {
}
public static function fromFile (path:String, defines:Map<String, Dynamic> = null, includePaths:Array<String> = null, useExtensionPath:Bool = false):ProjectXMLParser {
if (path == null) return null;
if (FileSystem.exists (path)) {
return new ProjectXMLParser (path, defines, includePaths, useExtensionPath);
}
return null;
}
private function parseAppElement (element:Fast, extensionPath:String):Void {
for (attribute in element.x.attributes ()) {