{"id":2616,"date":"2022-08-30T15:26:21","date_gmt":"2022-08-30T15:26:21","guid":{"rendered":"https:\/\/unknownerror.org\/index.php\/2014\/02\/04\/how-to-an-open-an-xml-file-found-in-the-same-folder-as-a-captive-air-application-for-mac-collection-of-common-programming-errors\/"},"modified":"2022-08-30T15:26:21","modified_gmt":"2022-08-30T15:26:21","slug":"how-to-an-open-an-xml-file-found-in-the-same-folder-as-a-captive-air-application-for-mac-collection-of-common-programming-errors","status":"publish","type":"post","link":"https:\/\/unknownerror.org\/index.php\/2022\/08\/30\/how-to-an-open-an-xml-file-found-in-the-same-folder-as-a-captive-air-application-for-mac-collection-of-common-programming-errors\/","title":{"rendered":"How to an open an XML file found in the same folder as a Captive Air application for Mac-Collection of common programming errors"},"content":{"rendered":"<p>I have created a Mac application using Air Captive Runtime. My folder structure is as follows:<\/p>\n<pre><code>parent\/\nparent\/data\/\nparent\/MyApp.app\n<\/code><\/pre>\n<p>I want to open xml files inside the &#8220;data&#8221; folder from MyApp.app but Air is not allowing me to do this.<\/p>\n<p>Since the actual swf file is burried inside the mac bundle, opening files inside the data folder is not as straight forward and using &#8220;..\/..\/&#8221; with applicationDirectory is not working since air is ignoring calls with &#8220;..&#8221;<\/p>\n<p>I have looked for examples to solve this but nothing seems to work.<\/p>\n<p>for example:<\/p>\n<pre><code>var baseDir:File = File.applicationDirectory;\n\nvar nativeBaseDir:File = File.applicationDirectory.resolvePath(baseDir.nativePath + \"..\/..\/..\/\");\n\nvar nativeBaseDirUrl = nativeBaseDir.nativePath();\n<\/code><\/pre>\n<p>Doesn&#8217;t seem to work for me. All my attempts result with my path being ignored once I seem to reach the parent folder.<\/p>\n<p>Can someone help?<\/p>\n<p>Thanks<\/p>\n<p>B<\/p>\n<p id=\"rop\"><small>Originally posted 2014-02-04 09:38:04. <\/small><\/p>","protected":false},"excerpt":{"rendered":"<p>I have created a Mac application using Air Captive Runtime. My folder structure is as follows: parent\/ parent\/data\/ parent\/MyApp.app I want to open xml files inside the &#8220;data&#8221; folder from MyApp.app but Air is not allowing me to do this. Since the actual swf file is burried inside the mac bundle, opening files inside the [&hellip;]<\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"closed","ping_status":"closed","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[1],"tags":[],"class_list":["post-2616","post","type-post","status-publish","format-standard","hentry","category-uncategorized"],"_links":{"self":[{"href":"https:\/\/unknownerror.org\/index.php\/wp-json\/wp\/v2\/posts\/2616","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/unknownerror.org\/index.php\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/unknownerror.org\/index.php\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/unknownerror.org\/index.php\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/unknownerror.org\/index.php\/wp-json\/wp\/v2\/comments?post=2616"}],"version-history":[{"count":0,"href":"https:\/\/unknownerror.org\/index.php\/wp-json\/wp\/v2\/posts\/2616\/revisions"}],"wp:attachment":[{"href":"https:\/\/unknownerror.org\/index.php\/wp-json\/wp\/v2\/media?parent=2616"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/unknownerror.org\/index.php\/wp-json\/wp\/v2\/categories?post=2616"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/unknownerror.org\/index.php\/wp-json\/wp\/v2\/tags?post=2616"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}