1
0
Fork 0
mirror of https://github.com/sirjuddington/SLADE.git synced 2025-12-04 16:24:30 -05:00
2 Scripting: ArchiveEntry Type
Simon Judd edited this page 2017-07-12 12:27:09 +09:30

The ArchiveEntry type represents an entry in SLADE.

Properties

Type Name Description
string name The entry name.
As an example, for an entry Actors/Weapons/Gun1.txt this will be Gun1.txt
string path The path to the entry in the archive, beginning and ending with /.
As an example, for an entry Actors/Weapons/Gun1.txt, this will be /Actors/Weapons/. If the entry isn't in a directory this will be just /
EntryType type The entry's type information
number size The size of the entry in bytes

Functions

formattedName

Parameters

  • boolean includePath: Whether to include the entry path
  • boolean includeExtension: Whether to include the entry extension
  • boolean upperCase: Whether to convert the entry name to uppercase

Returns string

Returns a formatted name of the entry, depending on the parameters given. Note that upperCase will not affect the path.

formattedSize

Returns string

Returns the size of the entry in a formatted string, eg. "1.3kb"