File Access Commands - adambiser/agk-lzma-plugin GitHub Wiki

OpenToRead

Syntax:

OpenToRead(archiveFileName as string, password as string) as integer

Description:

Opens an existing archive in read mode using the given password. The password can be an empty string. If the archive is not password-protected, the password is ignored. Raw file paths are supported.

Returns:

An archive ID if the operation succeeds; otherwise 0.

PluginError:

  • If the archive does not exist.
  • If the archive cannot be opened.

OpenToWrite

Syntax:

OpenToWrite(archiveFileName as string, password as string) as integer

Description:

Opens an existing archive in write mode using the given password. The password can be an empty string. Raw file paths are supported. Note that the file is not writted until the archive is closed.

Returns:

An archive ID if the operation succeeds; otherwise 0.

PluginError:

  • If the archive does not exist.
  • If the archive cannot be opened.

Close

Syntax:

Close(archiveID as integer)

Description:

Closes an open archive of the given archive ID. If the archive is in write mode, data will be compressed and the new file will be created at this time.

PluginError:

  • If given an invalid archive ID.
  • If there is an error while creating the file when closing a write mode archive.