[Overview][Constants][Types][Classes][Procedures and functions][Index] | Reference for unit 'libtar' (#fcl)

# TTarWriter.Create

Create a new archive

## Declaration

Source position: line 0

`public constructor TTarWriter.Create(`
`TargetStream: TStream`
`); overload; constructor TTarWriter.Create(`
`TargetFilename: String;`
`Mode: Integer = fmCreate`
`); overload;`

## Arguments

`TargetStream` |  | Stream to write archive to.

## Arguments

`TargetFilename` |  | Filename to write archive to.
`Mode` |  | Mode to open target file with. File must be writable

## Description

Create creates a new TTarWriter instance. This will start a new .tar archive. The archive will be written to the TargetStream stream or to a file with name TargetFileName, which will be opened with filemode Mode.

## Errors

In case TargetFileName cannot be opened, an exception will be raised.

## See also

TTarWriter.Destroy |  | Close archive and clean up TTarWriter

The latest version of this document can be found at lazarus-ccr.sourceforge.net.