RAD Studio VCL Reference
ContentsIndex
PreviousUpNext
SysUtils.FileIsReadOnly Function

Reports whether a file is read-only.

Pascal
function FileIsReadOnly(const FileName: string): Boolean;
C++
Boolean FileIsReadOnly(const AnsiString FileName);

SysUtils

FileIsReadOnly returns True if FileName can be found and opened, but the current process does not have permission to write to it.

Note: On Windows XP, FileIsReadOnly returns True if the file does not exist.
 

Copyright(C) 2008 CodeGear(TM). All Rights Reserved.
What do you think about this topic? Send feedback!