You can use OpenFile().
If a file is read-only, it returns 0. You would also have to check that the file actually exists first though, using FileType().
If a file is read-only, it returns 0. You would also have to check that the file actually exists first though, using FileType().