• 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: Sierra and URLByDeletingLastPathComponent
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Sierra and URLByDeletingLastPathComponent


  • Subject: Re: Sierra and URLByDeletingLastPathComponent
  • From: Shane Stanley <email@hidden>
  • Date: Sat, 24 Sep 2016 18:17:37 +1000

On 24 Sep. 2016, at 6:02 pm, Yvan KOENIG <email@hidden> wrote:
>
>> I guess the question is: why did you need the slash?
>
> I need it to build some full pathnames while driving LibreOffice with GUIScripting but I will look if I may get rid of that.

If you're getting the paths using Cocoa methods, you might as well build them that way too. The thing with methods like stringByAppendingPathComponent: is that it takes care of the slashes for you, adding one if needed. Similarly, lastPathComponent() returns the same result for /blah/blah/ as it does for /blah/blah.

--
Shane Stanley <email@hidden>
<www.macosxautomation.com/applescript/apps/>, <latenightsw.com>



 _______________________________________________
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: 
 >Rép: Sierra and URLByDeletingLastPathComponent (From: Yvan KOENIG <email@hidden>)
 >Re: Sierra and URLByDeletingLastPathComponent (From: Shane Stanley <email@hidden>)
 >Re: Sierra and URLByDeletingLastPathComponent (From: Yvan KOENIG <email@hidden>)

  • Prev by Date: Re: Sierra and URLByDeletingLastPathComponent
  • Next by Date: Another gibberish error
  • Previous by thread: Re: Sierra and URLByDeletingLastPathComponent
  • Next by thread: AppleScript in Sierra
  • Index(es):
    • Date
    • Thread