File_SetReadOnly()

Parent Previous Next

Syntax

File_SetReadOnly(pFileName As Global_sFileName, pReadOnly As Bit), Byte

Parameters

pFileName — The name of the file to set/clear the Read Only attribute

pReadOnly — 1 to mark read-only

                      0 to clear it


Return value — cErrOK = Success.

              cErrNotFound = File not found.


Sets or clears the read-only attribute bit on an existing file


Note: Windows/Linux respect the bit, this library doesn't yet enforce it internally.

         This only sets the FAT attribute bit - it does NOT currently stop File_WriteByte()/File_Delete() etc. from being called on this library's own File_* functions.

Example

    File_SetReadOnly("temp.txt",1)

Created with the Personal Edition of HelpNDoc: Benefits of a Help Authoring Tool