Mailing Lists: Apple Mailing Lists
Image of Mac OS face in stamp
Re: HFS paths (was Tell Blocks Considered Harmful)
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: HFS paths (was Tell Blocks Considered Harmful)




Le 20 déc. 2008 à 19:11, Axel Luttgens a écrit :

OK, but then why do I get this one:

	(POSIX file "/Volumes/Data") as text
	--> "Data"

So, let's have a small recap:

(POSIX file "/System") as text
--> "BootDisk:System"
(POSIX file "/System1") as text -- A non existing item (file or folder)
--> "BootDisk:System1"
(POSIX file "/Volumes/Data") as text
--> "Data"
(POSIX file "/") as text
--> "BootDisk:"


Clearly, the boot disk appears as an exception wrt file -> string coercion in AppleScript: differing conventions are applied according to the target. This is perhaps a very desirable behavior, but unless clearly justified and stated in the language definition, it tends to appear at least slightly inconsistent.


I don't see any exception.

If the passed Unix path ends with a slash, we get an HFS path ending with a colon.

If the passed Unix path doesn't end with a slash, we get an HFS path without an ending colon.

It seems to be coherent.

Yvan KOENIG (from FRANCE samedi 20 décembre 2008 19:33:56)




_______________________________________________ Do not post admin requests to the list. They will be ignored. AppleScript-Users mailing list (email@hidden) Help/Unsubscribe/Update your Subscription: Archives: http://lists.apple.com/archives/applescript-users

This email sent to email@hidden
References: 
 >Re: Tell Blocks Considered Harmful (was Re: open for access) (From: Richard Rönnbäck <email@hidden>)
 >Re: Tell Blocks Considered Harmful (was Re: open for access) (From: Axel Luttgens <email@hidden>)
 >Re: HFS paths (was Tell Blocks Considered Harmful) (From: Chris Page <email@hidden>)
 >Re: HFS paths (was Tell Blocks Considered Harmful) (From: Axel Luttgens <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.