SNOWFLAKES DRAWING PAPER

[AIR] AIRRuntime 2.5 File.resolvePath에서 제한된 상대경로 본문

개발/FLEX/AS3/AIR/BlazeDS

[AIR] AIRRuntime 2.5 File.resolvePath에서 제한된 상대경로

눈송2 2010. 10. 26. 15:12
AIRRuntime 2.5 & File Class test

File 클래스 resolvePath에 상대경로를 입력해서 사용하고 있었는데
AIRRuntime 2.5 업데이트 되면서 File 클래스에 상대경로를 입력 못하네요~

>>테스트1
var test:String = "\\testfolder\\..\\test..folder.exe";
trace( File.applicationDirectory.resolvePath(test) );
//결과
\\testfolder\test..folder.exe


>>테스트2
var test:String = "..\\testfolder\\..\\test..folder.exe";
trace( File.applicationDirectory.resolvePath(test) );
//결과
C:\Program Files\Test <- 테스트 어플리케이션 설치 경로


혹 상대경로를 이용해 구현한분 계시면 언능 절대경로로 수정하세요~


<?xml version="1.0" encoding="utf-8"?> 
<mx:WindowedApplication xmlns:mx="http://www.adobe.com/2006/mxml" layout="absolute" height="80"
<mx:Script><![CDATA
private function onBtnClick(evt:MouseEvent):void 
lbl.text = File.applicationDirectory.resolvePath(txi.text).nativePath;? 

]]></mx:Script> 
<mx:HBox width="100%"
<mx:Button click="onBtnClick(event)"/> 
<mx:TextInput id="txi" width="100%" text="..\\testfolder\\..\\test..folder.exe"/> 
</mx:HBox> 
<mx:Text id="lbl" bottom="0" width="100%" fontSize="15"/> 
</mx:WindowedApplication>
Comments