Check if a file is Read-Only

BlitzPlus Forums/BlitzPlus Programming/Check if a file is Read-Only

To write to files from a CD in blitz (using WriteInt and such), the files need to be unchecked for Read-Only in their properties. Every file is made Read-Only when copied onto CD. Is it possible for me to check to see if a file is read-only or not using BlitzBasic 2D?

WoeIsMe, I couldn't find a command that allows this in Blitz2D

attrib file.ext >file.txt
and then parse it I guess

Skully

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().