• 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: Creating unique numerical representation of file path?
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Creating unique numerical representation of file path?


  • Subject: Re: Creating unique numerical representation of file path?
  • From: Philip Aker <email@hidden>
  • Date: Sun, 14 Oct 2007 03:12:23 -0700

On 2007-14-10, at 00:08, Richard Rönnbäck wrote:

The file ID numbers look interesting, I will try to find out more and I would appreciate if you have more useful info on the subject!

Those are the inode-numbers. Also available in MetaData.osax. Here's how a mapping would work with that route: 

set fid to (item 1 of (md info for "~/Desktop/xcode.txt" reporting kMDItemID))

fid's kMDItemID -- store this number

Later, get it with:

md query "kMDItemID=" & item_id in directories (path to desktop) reporting kMDItemPath

This will work even if the query directory is "/".


Uuids look very interesting but I see a potentially huge problem, in that it seems impossible to generate the same number for the same path again, which the pessimist in me can see would be needed if let's say the file etc holding the mapping pairs gets corrupted or destroyed. They will however come in very handy in another part of the project!

True.  The whole idea of UUIDs is that they are unique.

§

Thanks for bringing up this topic -- interesting problem and the md5 solution is something I wouldn't have thought of. 

Philip Aker
email@hidden
 _______________________________________________
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: Creating unique numerical representation of file path?
      • From: "Mark J. Reed" <email@hidden>
References: 
 >Re: Creating unique numerical representation of file path? (From: Richard Rönnbäck <email@hidden>)

  • Prev by Date: Re: Creating unique numerical representation of file path?
  • Next by Date: Intel, Read/Write, and dates
  • Previous by thread: Re: Creating unique numerical representation of file path?
  • Next by thread: Re: Creating unique numerical representation of file path?
  • Index(es):
    • Date
    • Thread