-=TheShadow=- Posted May 25, 2008 Share Posted May 25, 2008 There is a lot file functions like fileOpen fileCreate fileClose and such,but how can i know if specific file is exist? is there any kind of fileExist? i didnt managed to find any function that will tell me that specific file is existed help Link to comment
Cazomino05 Posted May 25, 2008 Share Posted May 25, 2008 Just use fileOpen if it returns false then the file does not exist Link to comment
-=TheShadow=- Posted May 25, 2008 Author Share Posted May 25, 2008 i tried it,but when i fileOpen false file it retures ERROR and not just false value. EROR: fileOpen; unable to load file Link to comment
eAi Posted May 25, 2008 Share Posted May 25, 2008 Well, you can ignore this error - it'll still work as you want. Link to comment
DutchCaffeine Posted May 29, 2008 Share Posted May 29, 2008 This way you can check of the file exists or not. local file_handler = fileOpen("path/to/file.txt") if not file_handler then file_handler = fileCreate("path/to/file.txt") end Link to comment
HouseMD Posted June 3, 2008 Share Posted June 3, 2008 techniqually it tries to open the file, if it's not there create the file... not rly what he wants but still a good example (said that for someone that doesn't understand what the script does) Link to comment
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now