Skip to content

{$IF FILEEXIST(file)} {$ENDIF}

The ability to check the presence of a file before doing include will give very flexible features

{$IF FILEEXIST(file)}
  MyStr:={$INCLUDESTRINGFILE file};//if allow https://gitlab.com/freepascal.org/fpc/source/-/issues/25536 
{$ELSEIF}
  MyStr:='DefaultValue';
{$ENDIF}

оr

{$IF FILEEXIST(version.inc)}
  {$INCLUDE version.inc}
{$ELSEIF}
  Version:='unversionized';
{$ENDIF}

separate from #25536

Edited by Andrey Zubarev
To upload designs, you'll need to enable LFS and have an admin enable hashed storage. More information