KNOWLEDGE BASE
Log In    |    Knowledge Base    |    4D Home
Tech Tip: Checking whether a folder is empty
PRODUCT: 4D | VERSION: 2003.4 | PLATFORM: Mac & Win
Published On: August 12, 2004

Here is a simple method that checks to see whether the folder of the given path is empty:

  ` Project Method: IsFolderEmpty

C_BOOLEAN($0)
C_TEXT($1;$path)
ARRAY TEXT($arritems;0)
$path:=$1
FOLDER LIST($path;$arritems)
If (Size of array($arritems)=0)
  DOCUMENT LIST($path;$arritems)
    If (Size of array($arritems)=0)
      $0:=True
    End if
End if