• 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: Doug McNutt <email@hidden>
  • Date: Sat, 13 Oct 2007 10:15:52 -0600

At 07:33 +0200 10/13/07, Richard Rönnbäck wrote:
>I am working on a project where I prepare text files for import into
>FileMaker Pro. The text files contain various fields but the idea is to use
>the file path act as the matching field on import.

A feature of Apple's HFS file system is the file ID, a 32 bit number that does not change, ever.

It once applied only to directories but somewhere along the line, SYstem 7 or so, the space in the CatInfo block was used for files also. FileID's are probably used to make aliases work even though you can move files from directory to directory. They are assigned sequentially when files are created.

If, and there are a lot of them:

You remain on AppleHFS, You don't need to support pointing to copies of files, The files are not going to be edited. They won;t be moved to another volumes with environment variables getting placed into $PATH, Apple doesn't change the rules. . .

You could shorten the apparent name by appending FileID's to POSIX paths to the volume. As a hex number it would be a constant 8 bytes. It might also be possible to get into Apple's alias algorithms but, as far as I know, they are not published. A look at some alias resources might help.

Unix does have inodes which might work in a similar way.  ls with the -i switch shows them.

There is also the UNIX tool crypt which was once used to hash passwords to 32 but numbers. There is no guarantee of perfect uniqueness but if you can tolerate a bit of gambling. . .

--

-->  Halloween  == Oct 31 == Dec 25 == Christmas  <--
 _______________________________________________
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: 
 >Creating unique numerical representation of file path? (From: Richard Rönnbäck <email@hidden>)

  • Prev by Date: Remote FileMaker Database Access
  • Next by Date: Re: Remote FileMaker Database Access
  • 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