Mailing Lists: Apple Mailing Lists
Image of Mac OS face in stamp
Re: POSIX file usage
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: POSIX file usage



On Friday, August 30, 2002, at 12:25 AM, Adriaan Tijsseling wrote:

set dpath to ((path to preferences folder) as string) & "somefile.txt"
set upath to (POSIX path of dpath)
do shell script "open " & upath

Well, in my example I used the Preferences folder, but that is not always the case. What if it is in "/Users/foo/somdir/"?

Greetings Adriaan,

There is a trick for getting folders not listed in the Standard Additions dictionary. You can use the following form with different keywords:

POSIX path of (path to "usrs")
POSIX path of (path to "cusr")
POSIX path of (path to "sdat")

These keywords are adapted from the enumerations in header file called "Folders.h" which is available immediately to you if you have installed the Developer Tools or from several places on the internet (perhaps on Chris Nebel's idisk as well).


Cheers,

Philip Aker
http://www.aker.ca
_______________________________________________
applescript-users mailing list | email@hidden
Help/Unsubscribe/Archives: http://www.lists.apple.com/mailman/listinfo/applescript-users
Do not post admin requests to the list. They will be ignored.

References: 
 >Re: POSIX file usage (From: Adriaan Tijsseling <email@hidden>)



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

Contact Apple | Terms of Use | Privacy Policy

Copyright © 2011 Apple Inc. All rights reserved.