Summary
Calculates checksums for a set of files.
Loosely based on Ant's Checksum task.
- Assembly
- NAnt
.Contrib .dll - Namespace
- NAnt
.Contrib .Tasks - Base Types
-
- Task
graph BT
Type-->Base0["Task"]
Type["ChecksumTask"]
class Type type-node
Syntax
[TaskName("checksum")]
public class ChecksumTask : Task
Examples
<checksum algorithm="MD5" fileext="MD5">
<fileset>
<include name="${outputdir}\*.dll"/>
</fileset>
</checksum>
Remarks
This task takes a set of input files in a fileset
and calculates a checksum for each one of them.
You can specify the algorithm to use when calculating
the checksum value (MD5 or SHA1, for example).
The calculated value is saved to a file with the same
name as the input file and an added extension either
based on the algorithm name (e.g. .MD5), or whatever
is specified through the fileext attribute.
Attributes
| Type | Description |
|---|---|
| TaskName |
Properties
| Name | Value | Summary |
|---|---|---|
| Algorithm | string |
Name of Algorithm to use when calculating
the checksum. Can be MD5 or SHA1.
|
| FileExtension | string |
The generated checksum file's name will be the
original filename with "." and fileext
added to it. Defaults to the
algorithm name being used
|
| FileSet | FileSet |
Set of files to use as input
|
Methods
| Name | Value | Summary |
|---|---|---|
| ExecuteTask |
void |
This is where the work is done
|
| Initialize |
void |
Initializes task and ensures the supplied attributes are valid.
|
