Interesting...almost like it is using the searchpaths to look for the file, rather than actually telling you if it's there or not... Definitely seems like unexpected behavior to me.

fileIO docs mention:
The filename can be either a fully-qualified path and filename, or a relative filename. The Lingo '@' pathname operator is supported.


In this case is the name fully qualified, or relative?

What about using fileName() to compare the filename to the one that was passed in? Of course, this won't work if fileName() only returns the name and not the path... Don't know any way to get the path+filename of a currently open file with just fileIO...

~Mathew


Valentin Schmidt wrote:
Hi list,

I have a very simple utility-function which uses fileIO Xtra to find out
if a file exists (just for cases where Buddy API or FileXtra are not
available):

on fileExists fn
  fio=new(xtra "fileIO")
  fio.openFile(fn,1)
  err=fio.status()
  fio.closeFile()
  fio=void
  if err=0 then
    return 1
  else
    return 0
  end if
end

Now I found out that this function always returns true if a file with
the same filename as the filename in parameter fn (which is a full path)
exists in the moviepath, i.e. if fn doesn't exist, but a file with the
same name exists in the same folder as the *.dir, fileIO takes this one
instead for openFile, writeString etc. (dir mx, win xp pro). Does anyone
know a way to make fileIO stop behaving like that?

Thanks,
valentin

[To remove yourself from this list, or to change to digest mode, go to http://www.penworks.com/lingo-l.cgi To post messages to the list, email [EMAIL PROTECTED] (Problems, email [EMAIL PROTECTED]). Lingo-L is for learning and helping with programming Lingo. Thanks!]




[To remove yourself from this list, or to change to digest mode, go to http://www.penworks.com/lingo-l.cgi To post messages to the list, email [EMAIL PROTECTED] (Problems, email [EMAIL PROTECTED]). Lingo-L is for learning and helping with programming Lingo. Thanks!]

Reply via email to