Re: Invisible folder "Volumes"
Re: Invisible folder "Volumes"
- Subject: Re: Invisible folder "Volumes"
- From: Iurista GmbH <email@hidden>
- Date: Mon, 02 Jan 2012 13:27:41 +0100
Thanks Ron, that works fine....
Rudolf
Am 02.01.2012 um 07.04 schrieb Ron Hunsinger:
>
> On Jan 1, 2012, at 5:21 PM, Iurista GmbH wrote:
>> Hi
>>
>> does anyone know, why the folder "Volumes" of startup disk behaves otherwise than the other invisible folders on top level.
>> snip...snip...snip...
>>
>> How comes?
>
> I'm not entirely sure why, but it probably has to do with the fact that (disk "XYZ") has POSIX path "/Volumes/XYZ" and HFS path "XYZ:". Drop "XYZ" from all that, and (disk ""), if there were such a thing, would have POSIX path "/Volumes/" and HFS path ":". That is, Finder sees folder "Volumes" as the name of a disk whose name you forgot to mention, and turns it into an HFS path whose disk name is missing.
>
> If you change
>
> (TG as text)
>
> to
>
> (TG as alias as text)
>
> then it works as expected. This isn't the only place where Finder objects (files and folders) can't be coerced directly to text, but have to go through some intermediate form (usually alias) to get the correct result.
>
> BTW:
>
> set TheList to {}
> repeat with i from 1 to number of text items of (TG as alias as text)
> set theList to TheList & text item i of (TG as alias as text)
> end repeat
>
> can be written more simply and much more efficiently as
>
> set TheList to text items of (TG as alias as text)
_______________________________________________
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