fileIsBinary()

Author: Lexikos Last Modified: 20091226


This function checks if file is a text format or in binary format. The check is done by content of file and not from extension. This could be useful at unknwon extensions.

fileIsBinary(_filePath)

For more details of the functions's parameters and return value, please see it's source code.

Remarks

The initial given function by Tuncay is superceded by the simple one from Lexikos. But I decided not to give any License, the function is too simple for that.

For update's details and remarks related to the functions, please see the AutoHotkey Forum: http://www.autohotkey.com/forum/viewtopic.php?p=320069#320069

License

nonexistent

Example

; #Include fileIsBinary.ahk
#NoEnv
SendMode Input
SetWorkingDir %A_ScriptDir%

MsgBox % "A_ScriptFullPath: " . fileIsBinary(A_ScriptFullPath) . "`nA_AhkPath: " . fileIsBinary(A_AhkPath)