Skip to content

Scripting: Archive Type

Simon Judd edited this page Jul 11, 2017 · 1 revision

The Archive type represents an archive (wad/pk3/etc) in SLADE.

Functions

getFilename

Parameters

  • boolean full: Whether to return the full path to the file

Returns the filename of the archive. If full is true, the full path will be returned, otherwise just the filename.


allEntries

Returns ArchiveEntry array

Returns an array of all entries in the archive.


getDir

Parameters

  • string path: The path of the directory to get

Returns ArchiveDir

Returns the directory in the archive at path, or null if the path does not exist. If the archive does not support directories (eg. Doom Wad format) the 'root' directory is always returned, regardless of path.


createEntry

Parameters

  • string full_path: The full path and name of the entry to create
  • number position: The position to insert the entry

Returns ArchiveEntry

Description required


createEntryInNamespace

Parameters

  • string name: The name of the entry
  • string namespace: The namespace to add the entry to

Returns ArchiveEntry

Description required


removeEntry

Parameters

Returns boolean

Removes the given entry from the archive (but does not delete it). Returns false if the entry was not found in the archive.


renameEntry

Parameters

  • ArchiveEntry entry: The entry to rename
  • string name: The new name for the entry

Returns boolean

Renames the given entry. Returns false if the entry was not found in the archive.

Latest Release: 3.2.4

Clone this wiki locally