Finder seems to have trouble with POSIX
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