Quantcast
Channel: Adobe Community : Popular Discussions - InDesign Scripting
Viewing all articles
Browse latest Browse all 15932

MacWin path traps - looking for help

$
0
0

Hi everyone,

 

I am hoping someone with Mac will advice me how to manage the problem...

 

I am pushing file paths to the array from different sources (UI, doc links,  external list etc). The goal is to manage this on both Mac and Windows platform.

Unfortunately, I can not test using MacOS (lack of hardware nearby). The problem is to proper encoding for "special characters" alike "slash", "backslash", "question mark" etc - which - as far as I know - are acceptable while naming files/folders in Mac OS.

 

Lets say File is some real file on Mac. I stored File.fsName to var mPath and tried to eval back to the File from this var later on --> File(mPath) leads me to "undefined" path cause i.e slash (or backslash - I am not sure) is replaced 'on the fly' by colon.

 

Is a solution to use File.absoluteURI to store a proper encoding in this case or is it much more complex issue?

Could someone with any experience advice me which way to go?

 

Jarek


Viewing all articles
Browse latest Browse all 15932

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>