/*
Example:
${If} ${IsFile} "file.ext"
    ; code
${EndIf}
*/
!macro _IsFile _a _b _t _f
    !insertmacro _LOGICLIB_TEMP
    StrCpy $_LOGICLIB_TEMP -1
    IfFileExists `${_b}` "" +3
        IfFileExists `${_b}\*.*` +2 ; Be sure it's not just a directory
            StrCpy $_LOGICLIB_TEMP 0
            !insertmacro _= $_LOGICLIB_TEMP 0 `${_t}` `${_f}`
!macroend
!define IsFile `"" IsFile`

/*
Example:
${If} ${IsDir} "directory"
    ; code
${EndIf}
*/
!macro _IsDir _a _b _t _f
    IfFileExists `${_b}\*.*` `${_t}` `${_f}`
!macroend
!define IsDir `"" IsDir`