Re: open() : Files that don't exist

new topic     » goto parent     » topic index » view thread      » older message » newer message

Alex Chamberlain wrote:
> 
> Why does }}}
<eucode>open("debug.txt", "w")</eucode>
{{{
 create a file called
> "DEBUG.TXT"?
> Is there a way to get around this?
> 
> Thanks,
>  Alex

global function exist(sequence fileOrFolder)
  object x
    x=dir(fileOrFolder)
          if atom(x) then
             return 0
          else
             return 1
          end if
end function

if exist("debug.txt") then
  open("debug.txt", "w")
else
  --do nothing
end if

Don Cole
 A Bug is an un-documented feature.
A Feature is a documented Bug.

new topic     » goto parent     » topic index » view thread      » older message » newer message

Search



Quick Links

User menu

Not signed in.

Misc Menu