ファイルのパスを調べる

■プログラム説明
 ファイルパスを取得するにはファイルオブジェクトを作成し、そのfsNameを参照します。Macintosh HD:ps_text:sample.txtというファイルであれば/Macintosh HD/ps_text/sample.txtになります。

■ソースコード
filename = "Macintosh HD:ps_text:sample.txt";
fileObj = new File(filename);
fsname = fileObj.fsName;
fpath = fileObj.path;
alert(fsname);
alert(fpath);

■ポイント
 なし