MACSCRPT Archives

June 2006

MACSCRPT@LISTSERV.DARTMOUTH.EDU

Options: Use Monospaced Font
Show Text Part by Default
Show All Mail Headers

Message: [<< First] [< Prev] [Next >] [Last >>]
Topic: [<< First] [< Prev] [Next >] [Last >>]
Author: [<< First] [< Prev] [Next >] [Last >>]

Print Reply
Subject:
From:
Brian Johnson <[log in to unmask]>
Reply To:
Macintosh Scripting Systems <[log in to unmask]>
Date:
Sat, 10 Jun 2006 16:36:26 -0700
Content-Type:
TEXT/PLAIN
Parts/Attachments:
TEXT/PLAIN (31 lines)
Hi Philip,

Yes, the "'file-path as alias' in a try block" approach is Finder-free, 
and really elegant, but it doesn't handle folders in the path that are 
LNKs (not sure about aliases). The Finder test (and apache) does OK with 
LNK'd folders. (At least, according to my notes in the source!). This 
particular "FileExists" function has had both incarnations, but currently 
uses the Finder tell block because I need to handle chunks of web-site 
that are on other volumes). Time to come up with another strategy!

As you say, perhaps some bizarre interaction ...

  - B.Johnson


  Philip Aker wrote:

> Brian,
>
> You don't need the Finder to verify file existence. Can't really
> explain the crash though unless it's some bizarre interaction with a
> symlink from httpd or maybe even a simple permissions error.
>
> try
>      set cgi to ("Macintosh HD:Library:Webserver:Documents:cgi-
> bin:nope.html") as alias
>      return true
> on error errs
>      return false
> end try

ATOM RSS1 RSS2