• 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: Files, Folders and Paths
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Files, Folders and Paths


  • Subject: Re: Files, Folders and Paths
  • From: Joel Esler via AppleScript-Users <email@hidden>
  • Date: Tue, 9 May 2023 21:56:42 -0400

So, for the first try block to fail and the second one to succeed, thePath would need to be an object that isn't a string, but still has a valid path property that can be converted to a string. That is, thePath should be a disk item (a file or a folder), but not a string representing a disk item.

To illustrate this, suppose thePath is an actual file object rather than a string representing a file path. In this case, the first try block would fail because thePath as string would not yield a valid file path, but the second try block would succeed because path of thePath would yield a valid file path that can then be converted to an alias.


— 
Sent from my iPhone

On May 9, 2023, at 13:38, Gil Dawson via AppleScript-Users <email@hidden> wrote:

I've been reviewing Apple's documentation on files, folders, paths and such.  Several examples surprised me.  Here is one:

Converting a Path to an Alias

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: 
 >Files, Folders and Paths (From: Gil Dawson via AppleScript-Users <email@hidden>)

  • Prev by Date: Files, Folders and Paths
  • Next by Date: Re: Files, Folders and Paths
  • Previous by thread: Files, Folders and Paths
  • Next by thread: Re: Files, Folders and Paths
  • Index(es):
    • Date
    • Thread