Check if a file is Read-Only

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

WoeIsMe(Posted 2003) [#1]
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?


Jeroen(Posted 2003) [#2]
WoeIsMe, I couldn't find a command that allows this in Blitz2D


_Skully(Posted 2003) [#3]
attrib file.ext >file.txt
and then parse it I guess

Skully


GfK(Posted 2003) [#4]
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().