• 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: Performance when Checking if File Exists
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Performance when Checking if File Exists


  • Subject: Re: Performance when Checking if File Exists
  • From: Richard Morton <email@hidden>
  • Date: Sat, 23 Feb 2002 20:04:31 +1100

On Saturday, February 23, 2002, at 01:40 AM, Daniel Shockley wrote:
There was a nice thread on high-perfomance file-exists handlers,
and Richard was the one posted the one that I incorrectly thought
I had made...

...I needed to clear that up. Thanks, all, and thanks to Richard for
giving me the chance to post the correction...

Well, likewise Dan - I appreciate you doing it. I'm sure everyone can relate to making an honest mistake and we've all had memory lapses. What I will remember of this is that you dealt with it very decently. Not everyone would have done that. :-)


Richard, any idea about the memory-leak issue I've read about when
trying to resolve invalid aliases?

Hmm. I seem to recall that Emmanuel noted it & that it was to do with dead or orphaned aliases, but that's about all I can remember and I don't think I kept that thread - sorry. :-\

Someone else will recall it more clearly I'm sure: Emmanuel? Nigel?


on testPathExists(inputPath)
-- version 1.4
-- Dan Shockley, email@hidden
-- CORRECTION, Richard Morton's
-- gets somewhat slower as nested-depth level goes over 10
nested folders
if inputPath is not equal to "" then try
get alias inputPath as string
return true
end try
return false
end testPathExists


Or, how about this even:

on testPathExists(inputPath)
-- version 1.4.1
-- Dan Shockley, Richard Morton
-- gets somewhat slower as nested-depth level goes over 10
nested folders
if inputPath is not equal to "" then try
get alias (inputPath as string) -- coerce to string, then test for existence
return true
end try
return false
end testPathExists


_______________________________________________
applescript-users mailing list | email@hidden

Holy mackerel Batman! How did we end up here? I thought this thread was on macscrpt... ;-)


Cheers,

Richard Morton
-- looking for a quantum mechanic who could fix that unsightly black hole in the spare room.
_______________________________________________
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.
References: 
 >Re: Performance when Checking if File Exists (From: Daniel Shockley <email@hidden>)

  • Prev by Date: Re: AFP,SMB share mounting
  • Next by Date: Re: Performance when Checking if File Exists
  • Previous by thread: Re: Performance when Checking if File Exists
  • Next by thread: Re: Performance when Checking if File Exists
  • Index(es):
    • Date
    • Thread