The function FileIsReadOnly asks a question - whether the file named by the parameter FileName is a property of ReadOnly or not.
It returns a boolean result of True if the file is ReadOnly, or False if it is not.
The FileName must include the full path.
Please also review the function RemoveReadOnly.
Declaration: Function FileIsReadOnly(const FileName : string) : Boolean
To try this simple example, substitute your own file names and paths.