## Conditions

The conditions that are part of this Antlib can be used with the core `condition` task or any other task that uses conditions, like Apache AntUnit's `assertTrue` task.

The main purpose of these conditions is to support the Antlib's own tests, but they may be useful outside of that scope as well.

## HasGroupId

Validates that the group id of a given archive entry matches an expected value.

### Parameters

Attribute | Description | Required
id | the expected numeric group id. | Yes

### Parameters specified as nested elements

Exactly one of a core `tarentry` or an `arentry`, `cpioentry` or `tarentry` as defined by this Antlib specifies the resource to check.

## HasGroupName

Validates that the group name of a given archive entry matches an expected value.

### Parameters

Attribute | Description | Required
name | the expected group name. | Yes

### Parameters specified as nested elements

Exactly one `tarentry` of a Ant's core or as defined by this Antlib specifies the resource to check.

## HasMode

Validates that the mode (or permissions) of a given archive entry matches an expected value.

Archives store more than just the Unix permissions as a mode flag. In general the last twelve bit of the mode correspond to the Unix permissions set (including sticky bits). If the `mode` attribute of this condition specifies a number between 0 and 7777 (octal, inclusive) only the permissions part of the mode will be compared, if it is bigger than 7777 (octal) the full mode value will be compared.

### Parameters

Attribute | Description | Required
mode | the expected mode as an octal number. | Yes

### Parameters specified as nested elements

Exactly one of a core `tarentry` or `zipentry` or any archive entry as defined by this Antlib specifies the resource to check.

## HasUserId

Validates that the user id of a given archive entry matches an expected value.

### Parameters

Attribute | Description | Required
id | the expected numeric user id. | Yes

### Parameters specified as nested elements

Exactly one of a core `tarentry` or an `arentry`, `cpioentry` or `tarentry` as defined by this Antlib specifies the resource to check.

## HasUserName

Validates that the user name of a given archive entry matches an expected value.

### Parameters

Attribute | Description | Required
name | the expected user name. | Yes

### Parameters specified as nested elements

Exactly one `tarentry` of a Ant's core or as defined by this Antlib specifies the resource to check.