Unit 'libtar' Package
[Overview][Constants][Types][Classes][Procedures and functions][Index] [#fcl]

TTarArchive.ReadFile

Read a file from the archive.

Declaration

Source position: libtar.pp line 171

public procedure TTarArchive.ReadFile(

  Buffer: POINTER

); overload;

procedure TTarArchive.ReadFile(

  Stream: TStream

); overload;

procedure TTarArchive.ReadFile(

  Filename: string

); overload;

function TTarArchive.ReadFile: RawByteString; overload;

Arguments

Buffer

  

Memory buffer to copy file contents to.

Arguments

Stream

  

Stream to copy file contents to.

Arguments

Filename

  

Filename for file in which to write file content.

Function result

File contents as string.

Description

ReadFile can be used to read the current file in the archive. It can be called after the archive was successfully positioned on an entry in the archive. The file can be read in various ways:

Errors

An exception may occur if the buffer is not large enough, or when the file specified in filename cannot be opened.


Documentation generated on: Jul 24 2023