private static function FilterByType($dir, $file, FileSystemEntryType $type = null)
    {
        if ($file == '.' || $file == '..')
            return false;
        
        if (!$type)
            return true;
        
        $path = Path::Combine($dir, $file);
        
        
        switch ($type)
        {
            case FileSystemEntryType::File():
                return is_file($path);
                
            case FileSystemEntryType::Folder():
                return is_dir($path);
                
            case FileSystemEntryType::Link():
                return is_link($path);
        }
        return false;
    }
private static function FilterByType($dir, $file, FileSystemEntryType $type = null)
    {
        if ($file == '.' || $file == '..')
            return false;
        
        if (!$type)
            return true;
        
        $path = Path::Combine($dir, $file);
        
        
        switch ($type)
        {
            case FileSystemEntryType::File():
                return is_file($path);
                
            case FileSystemEntryType::Folder():
                return is_dir($path);
                
            case FileSystemEntryType::Link():
                return is_link($path);
        }
        return false;
    }
private static function FilterByType ( $ dir , $ file , FileSystemEntryType $ type = null ) { if ( $ file == '.' || $ file == '..' ) return false ; if ( ! $ type ) return true ; $ path = Path :: Combine ( $ dir , $ file ) ; switch ( $ type ) { case FileSystemEntryType :: File ( ) : return is_file ( $ path ) ; case FileSystemEntryType :: Folder ( ) : return is_dir ( $ path ) ; case FileSystemEntryType :: Link ( ) : return is_link ( $ path ) ; } return false ; }
Returns true if the file sytem entry matches the given type
@param string $dir
@param string $file
@param FileSystemEntryType $type
@return bool
Returns true if the file sytem entry matches the given type