Mailing Lists: Apple Mailing Lists

Image of Mac OS face in stamp
 
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

How to determine if a file is an alias



Is there any way to determine if a file is an alias from Java? 
 
I have found that testing the file type of the file (as returned by FileManager.getFileType) for 1717858928 will find aliases of folders, but not aliases for files.
 
I have also tried checking the canonical path of the file against the path of the file against the actual path of the file.  Which does not seem to work (although this does work on other systems). 
 
Also, under Tiger the performance of retrieving the canonical path or the FileType seems to have degraded significantly from Panther.  I have run performance tests where I check the canonical path or FileType in one test and do not test it in another.  Previously, all numbers were virtually identical.
 
Test Listing 1000 files
Do not Check FileType or Canonical Path = 0.3 sec
Check FileType = 3.7 sec
Check Canonical Path = 3.5 sec
 
Any help on how to find aliases would be much appreciated.
 
Thanks in advance,
 
- Mark
 
 _______________________________________________
Do not post admin requests to the list. They will be ignored.
Java-dev mailing list      (email@hidden)
Help/Unsubscribe/Update your Subscription:
http://lists.apple.com/mailman/options/java-dev/email@hidden

This email sent to email@hidden



Visit the Apple Store online or at retail locations.
1-800-MY-APPLE

Contact Apple | Terms of Use | Privacy Policy

Copyright © 2007 Apple Inc. All rights reserved.