Re: How check for "path/file exists"?

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

--returns 1 if file exists, 0 if it doesn't
global function file_exists(sequence fpath)
        integer a
        a=open(fpath,"r")
        if a=-1 then
           --not found
           a=0
        else
           --found
           close(a)
           a=1
        end if
        return a
end function

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

Search



Quick Links

User menu

Not signed in.

Misc Menu