[Overview][Constants][Types][Procedures and functions][Variables][Index] |
Determines if the specified file contains plain text content.
Source position: lazfileutils.pas line 56
function FileIsText( |
const AFilename: string |
):Boolean; |
const AFilename: string; |
out FileReadable: Boolean |
):Boolean; |
AFilename |
|
File name to examine in the function. |
True when the file contains plain text content.
AFilename |
|
File name to examine in the function. |
FileReadable |
|
Indicates if the specified file was successfully opened and read. |
FileIsText is a Boolean function used to determine if the specified file contains plain text content. The overloaded variant that includes the FileReadable argument is used to examine the content in the file.
FileIsText calls FileOpenUtf8 for the specified file name. The return value is False is the file handle contains feInvalidHandle.
FileIsText checks for (and skips) common Byte Order Marks, such as:
Content in the file (up to 1024 characters) is checked to ensure that invalid Null and Control characters are not found in the file. The return value is True when the specified file name exists in the local file system, and does not contain Null or Control characters.
Version 3.2 | Generated 2024-02-25 | Home |