Metadata Commands - adambiser/agk-lzma-plugin GitHub Wiki

GetFilePath

Syntax:

GetFilePath(archiveID as integer) as string

Description:

Returns the file path of the given archive ID.

When in write mode, this path will point to the read folder if the archive is being appended and the file was found there. Otherwise, this will be the write path or the raw path, if one is given.

Returns:

The file path.

PluginError:

  • If given an invalid archive ID.

GetItemListJSON

Syntax:

GetItemListJSON(archiveID as integer) as string

Description:

Returns the directory item list of the archive as a JSON string.

[
	{
		"Name": "Item name",
		"Size": 1024,
		"IsDir": 0
	}
]

Returns:

The JSON string of information on all of the items in the archive.

PluginError:

  • If given an invalid archive ID.

HasItem

Syntax:

HasItem(archiveID as integer, itemName as string) as integer

Description:

Checks to see if the archive has an item with the given name.

Returns:

1 if the item exists; otherwise 0.

PluginError:

  • If given an invalid archive ID.