• Open Menu Close Menu
  • Apple
  • Shopping Bag
  • Apple
  • Mac
  • iPad
  • iPhone
  • Watch
  • TV
  • Music
  • Support
  • Search apple.com
  • Shopping Bag

Lists

Open Menu Close Menu
  • Terms and Conditions
  • Lists hosted on this site
  • Email the Postmaster
  • Tips for posting to public mailing lists
Re: ID of a Disk
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: ID of a Disk


  • Subject: Re: ID of a Disk
  • From: "koenig.yvan" <email@hidden>
  • Date: Mon, 17 Mar 2014 17:40:37 +0100


Le 17/03/2014 à 16:40, Luther Fuller <email@hidden> a écrit :

On Mar 17, 2014, at 10:29 AM, Ted Wrigley wrote:

As I understand it -which may not be perfectly - the id property of a file system item in the Finder or System Events is the HFS file system id, a bitmap used by the various catalog files. It is unrelated to a disk’s UUID. 

The UUID is not involved with this problem.

System Events is merely presenting more information than the Finder in a comma-delimited list.

And that is the problem.
System Event's 'id of aDisk' shows unwanted information such as the 'name of aDisk' which should not be there.


Hello Luther, don't be so nervous ;-)

Why would the id returned by System Events match what you assume ? 
There is no reason for that.

System Events dictionary claims :

id (text, r/o) : the unique ID of the disk item (no more, no less)

In your code, aDisk is a reference to disk item and what a surprise, you get a text (aka string) result.

As far as I know, it's the unique case where id is said to be a text, all others are said to be integers.
No need to be a sooth sayer to understand that it must be a reason for this difference.

Here I got "Macintosh HD,-100,2"

-100 is what is returned by the Finder.

If you are interested by the shared value, I'm sure that you are able to extract it from the value returned by System Events.
I will no try to offend you by posting the required piece of code ;-)

SE return three infos in a single string :
Macintosh HD  - which is redundant but is not wrong
-100  - which is identical to the Finder's id
2 - which means something but who knows what.
If there is a true problem here, it's certainly not the difference between id from Finder's point of view and id from System Events' one,
it's just what is the meaning of the third component.


Yvan KOENIG (VALLAURIS, France) lundi 17 mars 2014 17:36:33



 _______________________________________________
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

  • Follow-Ups:
    • Re: ID of a Disk
      • From: Ron Hunsinger <email@hidden>
References: 
 >Re: ID of a Disk (From: Ted Wrigley <email@hidden>)
 >Re: ID of a Disk (From: Luther Fuller <email@hidden>)

  • Prev by Date: Re: ID of a Disk
  • Next by Date: Re: ID of a Disk
  • Previous by thread: Re: ID of a Disk
  • Next by thread: Re: ID of a Disk
  • Index(es):
    • Date
    • Thread