KNOWLEDGE BASE
Log In    |    Knowledge Base    |    4D Home
Tech Tip: A utility method to detect if a file is an alias or a regular file
PRODUCT: 4D | VERSION: 12.3 | PLATFORM: Mac & Win
Published On: June 22, 2012

The following utility method can be used to quickly determine if a file is an alias or a regular file:

C_TEXT($1;ActualPath_t)
C_BOOLEAN($0)
RESOLVE ALIAS($1;ActualPath_t)
If (OK=1)
   $0:=True
Else
   $0:=False
End if


If the project method is saved as UTIL_isFileAlias it can be used like this:

If (UTIL_isFileAlias (myFile))
    // file is an alias
Else
    // file is not an alias
End if