• 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
Finder seems to have trouble with POSIX
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Finder seems to have trouble with POSIX


  • Subject: Finder seems to have trouble with POSIX
  • From: Gil Dawson via AppleScript-Users <email@hidden>
  • Date: Wed, 3 Aug 2022 20:13:29 -0700

Hi--

I'm using macOS Mojave V10.14.6.

Could someone please help me understand what is happening here?

set F1 to "/Users/gil/Desktop/Temp Test File.pdf"

log "F1=" & F1 --> (*F1=/Users/gil/Desktop/Temp Test File.pdf*)
log "POSIX file F1=" & POSIX file F1 --> (*POSIX file F1=Internal
SSD:Users:gil:Desktop:Temp Test File.pdf*)

set PF1 to POSIX file F1
log "PF1=" & PF1 --> (*PF1=Internal SSD:Users:gil:Desktop:Temp Test File.pdf*)


tell application "Finder" to exists file F1 --> false (I expected an error)
tell application "Finder" to exists POSIX file F1 --> false (I expected "true")
tell application "Finder" to exists (POSIX file F1) --> false  (I expected
"true")
tell application "Finder" to exists PF1 --> true (I expected that!)


I would have thought that the first of the last four lines would error and the
last three lines would all return "true".

I'd appreciate help understanding this.

--Gil


 _______________________________________________
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: Finder seems to have trouble with POSIX
      • From: Deivy Petrescu via AppleScript-Users <email@hidden>
    • Re: Finder seems to have trouble with POSIX
      • From: CK via AppleScript-Users <email@hidden>
  • Next by Date: Re: Finder seems to have trouble with POSIX
  • Next by thread: Re: Finder seems to have trouble with POSIX
  • Index(es):
    • Date
    • Thread