Quantcast
Channel: Adobe Community : Popular Discussions - AIR Development
Viewing all articles
Browse latest Browse all 24121

File - File on network location

$
0
0

Hello,

On many occasions I have had to make a benchmark of my files and this time I must comparing the files that I have on a PC with which I have stored on a Mac; at this point a question arises:

 

How to declare the File variable when it is in a network location?

 

To do this, I need do solve this checklist:

 

  1. I have access to the machine in the local network (username, password, stored credentials)
  2. I know the path that points to the drive or directory that you want access.

 

With this elements covered, I must declare the File variable, with the following notation:

 

var macStr:String = "file:////MacBook-Pro-de-Jaime.local/Seagate/netShared/transport-machines/SoftDepot";

var windStr:String = "file:///U:/Appliances/Libraries/SoftDepot";

 

var macStorage:File = newFile (macStr);

var pcStorage:File = newFile (windStr);

 

And presto, I was unable to access a network location to make my benchmark.

 

Note that in the chains of the native path to the network location (macStr) the file descriptor is accompanied by four slash (file:////), while in the conventional notation file system has only file descriptor 3 slash (file:///)

 

I hope someone will be useful this TIP.


Viewing all articles
Browse latest Browse all 24121

Trending Articles