flexcoders  

RE: [flexcoders] Re: Platform independent paths in AIR

Jim Hayes
Mon, 14 Apr 2008 03:46:02 -0700

I understand from your description that your problem is not that the
path is represented in a cross platform way,
But that the path *actually differs* according to how the network volume
is mapped on mac/pc ?
 
For instance, limit it to windows only and imagine the the network
volume you are interested in is normally mapped on my companies client
machines to h:\, yet due to the fact that I am a rebel (and a fool, and
an administrator *) I have it mapped to z:\. The problem is that the
path actually differs, not that there is a platform issue in the way it
is represented.
 
Do I understand you correctly?
 
In terms of cross platform filepaths, the the file:/// protocol usually
works pretty well in my experience.
 
* all of which do happen to be true :-)
 
-----Original Message-----
From: flexcoders@yahoogroups.com [EMAIL PROTECTED] On
Behalf Of zdenekmikan
Sent: 14 April 2008 11:24
To: flexcoders@yahoogroups.com
Subject: [flexcoders] Re: Platform independent paths in AIR
 
I do not know what you mean by any other software, but in Acrobat SDK
there is a function ASFileSysCreatePathName which creates device
independent pathname from native path. I am looking for some method
how to do this in AIR (which is supposed to be cross-platform).

--- In flexcoders@yahoogroups.com <mailto:flexcoders%40yahoogroups.com>
, "Jim Hayes" <[EMAIL PROTECTED]> wrote:
>
> I'm not sure that flex or any other software is going to be able to
help
> you with that one.
> I have a scenario where I need to identify resources on a DVD disk,
it's
> necessary to loop though the system root drives and test each one for
> the presence of a file that I know to be on the DVD.
> I suspect that you may have to do something similar I'm afraid (either
> that or ask the user).
> 
> -----Original Message-----
> From: flexcoders@yahoogroups.com <mailto:flexcoders%40yahoogroups.com>
[mailto:flexcoders@yahoogroups.com <mailto:flexcoders%40yahoogroups.com>
] On
> Behalf Of zdenekmikan
> Sent: 14 April 2008 09:45
> To: flexcoders@yahoogroups.com <mailto:flexcoders%40yahoogroups.com> 
> Subject: [flexcoders] Re: Platform independent paths in AIR
> 
> I am not using hard coded paths. My app uploads files (jpeg images
> selected by browseForOpenMultiple) from LAN volume, e.g mapped to O:
> on PC. To be able to get access to these files from Mac AIR app I need
> the name of server which is mapped to this O: letter. And to be able
> to access files uploaded from Mac on PC I need to know the letter on
> which the server with saved name is mapped on PC.
> 
> --- In flexcoders@yahoogroups.com
<mailto:flexcoders%40yahoogroups.com>
<mailto:flexcoders%40yahoogroups.com>
> , Jeffry Houser <jeff@> wrote:
> >
> > 
> > I haven't had to deal with that yet. I guess you'll have to do some 
> > form of "if MAC use X path", "if PC, use Y Path". My impulse is that

> > with hard coded paths your app will lose some portability. I also 
> > suspect that you may have security considerations when accessing a 
> > network share.
> > 
> > zdenekmikan wrote:
> > > 
> > > 
> > > Unfortunately this solution does not work when I need to access
the
> > > same file on LAN local file server from AIR applications on Mac
> and Win.
> > > 
> > > --- In flexcoders@yahoogroups.com
<mailto:flexcoders%40yahoogroups.com> 
> <mailto:flexcoders%40yahoogroups.com> 
> <mailto:flexcoders%40yahoogroups.com>, 
> > > Jeffry Houser <jeff@> wrote:
> > > >
> > > >
> > > > Use relative paths instead of absolute paths.
> > > >
> > > > I wrote about this here:
> > > >
> > >
>
http://www.jeffryhouser.com/index.cfm/2008/2/19/Local-Access-URLs-in-Ado
<http://www.jeffryhouser.com/index.cfm/2008/2/19/Local-Access-URLs-in-Ad
o> 
> be-AIR
>
<http://www.jeffryhouser.com/index.cfm/2008/2/19/Local-Access-URLs-in-Ad
<http://www.jeffryhouser.com/index.cfm/2008/2/19/Local-Access-URLs-in-Ad
> 
> obe-AIR> 
> 
> > >
>
<http://www.jeffryhouser.com/index.cfm/2008/2/19/Local-Access-URLs-in-Ad
<http://www.jeffryhouser.com/index.cfm/2008/2/19/Local-Access-URLs-in-Ad
> 
> obe-AIR
>
<http://www.jeffryhouser.com/index.cfm/2008/2/19/Local-Access-URLs-in-Ad
<http://www.jeffryhouser.com/index.cfm/2008/2/19/Local-Access-URLs-in-Ad
> 
> obe-AIR> >
> > > 
> > > >
> > > >
> > > >
> > > >
> > > > Zdenek Mikan wrote:
> > > > >
> > > > >
> > > > > Is it possible to get platform independent path for file or
> folder in
> > > > > Adobe AIR?
> > > > >
> > > > > If I want to use the same Air application on Mac and Win, how
> can I
> > > > > translate the file paths between platforms? (The native path
on
> > > Win does
> > > > > not include the server name, only the mapping on letter.)
> > > > >
> > > >
> > > > --
> > > > Jeffry Houser
> > > > Flex, ColdFusion, AIR
> > > > AIM: Reboog711 | Phone: 1-203-379-0773
> > > > --
> > > > Adobe Community Expert
> > > >
> <http://www.adobe.com/communities/experts/members/JeffryHouser.html
<http://www.adobe.com/communities/experts/members/JeffryHouser.html> 
> <http://www.adobe.com/communities/experts/members/JeffryHouser.html
<http://www.adobe.com/communities/experts/members/JeffryHouser.html> > 
> > >
<http://www.adobe.com/communities/experts/members/JeffryHouser.html
<http://www.adobe.com/communities/experts/members/JeffryHouser.html> 
> <http://www.adobe.com/communities/experts/members/JeffryHouser.html
<http://www.adobe.com/communities/experts/members/JeffryHouser.html> >
>>
> > > > My Company: <http://www.dot-com-it.com
<http://www.dot-com-it.com>  <http://www.dot-com-it.com
<http://www.dot-com-it.com> >
> <http://www.dot-com-it.com <http://www.dot-com-it.com>
<http://www.dot-com-it.com <http://www.dot-com-it.com> > >>
> > > > My Podcast: <http://www.theflexshow.com
<http://www.theflexshow.com> 
> <http://www.theflexshow.com <http://www.theflexshow.com> > 
> <http://www.theflexshow.com <http://www.theflexshow.com>
<http://www.theflexshow.com <http://www.theflexshow.com> > >>
> > > > My Blog: <http://www.jeffryhouser.com
<http://www.jeffryhouser.com> 
> <http://www.jeffryhouser.com <http://www.jeffryhouser.com> > 
> <http://www.jeffryhouser.com <http://www.jeffryhouser.com>
<http://www.jeffryhouser.com <http://www.jeffryhouser.com> > >>
> > > >
> > > 
> > > 
> > 
> > -- 
> > Jeffry Houser
> > Flex, ColdFusion, AIR
> > AIM: Reboog711 | Phone: 1-203-379-0773
> > --
> > Adobe Community Expert 
> > <http://www.adobe.com/communities/experts/members/JeffryHouser.html
<http://www.adobe.com/communities/experts/members/JeffryHouser.html> 
> <http://www.adobe.com/communities/experts/members/JeffryHouser.html
<http://www.adobe.com/communities/experts/members/JeffryHouser.html> > >
> > My Company: <http://www.dot-com-it.com <http://www.dot-com-it.com>
<http://www.dot-com-it.com <http://www.dot-com-it.com> > >
> > My Podcast: <http://www.theflexshow.com <http://www.theflexshow.com>
<http://www.theflexshow.com <http://www.theflexshow.com> > >
> > My Blog: <http://www.jeffryhouser.com <http://www.jeffryhouser.com>
<http://www.jeffryhouser.com <http://www.jeffryhouser.com> > >
> >
> 
> 
> __________________________________________________________
> This communication is from Primal Pictures Ltd., a company
registered in England and Wales with registration No. 02622298 and
registered office: 4th Floor, Tennyson House, 159-165 Great Portland
Street, London, W1W 5PA, UK. VAT registration No. 648874577.
> 
> This e-mail is confidential and may be privileged. It may be read,
copied and used only by the intended recipient. If you have received
it in error, please contact the sender immediately by return e-mail or
by telephoning +44(0)20 7637 1010. Please then delete the e-mail and
do not disclose its contents to any person.
> This email has been scanned for Primal Pictures by the MessageLabs
Email Security System.
> __________________________________________________________
>
 

______________________________________________________________________
This communication is from Primal Pictures Ltd., a company registered in 
England and Wales with registration No. 02622298 and registered office: 4th 
Floor, Tennyson House, 159-165 Great Portland Street, London, W1W 5PA, UK. VAT 
registration No. 648874577.

This e-mail is confidential and may be privileged. It may be read, copied and 
used only by the intended recipient. If you have received it in error, please 
contact the sender immediately by return e-mail or by telephoning +44(0)20 7637 
1010. Please then delete the e-mail and do not disclose its contents to any 
person.
This email has been scanned for Primal Pictures by the MessageLabs Email 
Security System.
______________________________________________________________________