Re: Behavior change in "open for access" from AS 1.6 to 1.8.3?
Re: Behavior change in "open for access" from AS 1.6 to 1.8.3?
- Subject: Re: Behavior change in "open for access" from AS 1.6 to 1.8.3?
- From: Timothy Bates <email@hidden>
- Date: Fri, 05 Jul 2002 16:28:08 +1000
>
[in AS 1.6 open for access thPath returned -43 is the file did not exist
>
in 1.8.3 I get a -39 error (End of file)
>
and it creates an empty file!
>
Is this a known (and intended) change?
Form the dictionary for open for access we learn "If the file does not
exist, a new file is created", so you are getting the expected behavior.
AppleScrtipt has changed its behavior regarding reading files with no
content, and setting the eof in files with no content, but that is another
issue.
To check if a file exists, you could use something like
on FileExists(thePath) --check if a file exists
try
alias (thePath as string)
return true
on error
return false
end try
end FileExists
_______________________________________________
applescript-users mailing list | email@hidden
Help/Unsubscribe/Archives:
http://www.lists.apple.com/mailman/listinfo/applescript-users
Do not post admin requests to the list. They will be ignored.