Skip to main content

Module files

Module files 

Source
Expand description

File operations: create, add, delete, move, extract, decode and save files of the open packs, and read files from every data source.

EnumsΒ§

DecodedFile
Result of decoding a file.

ConstantsΒ§

FOLDER_FILES_IN_ERRORS πŸ”’
Maximum amount of files of a folder listed in the error of reading it as a file.
UNDECODEABLE_FILE_TYPES πŸ”’
File types the server never tries to decode.

FunctionsΒ§

container_path πŸ”’
Returns a path as a file path if has_file says there’s a file at it, or as a folder path otherwise.
decode πŸ”’
Decodes a file, skipping the types the server doesn’t decode.
decoded_anim_pack πŸ”’
Decodes an AnimPack file, returning its decoded data.
duplicate_path πŸ”’
Returns a path for a copy of a file, incrementing the trailing number of its name until it’s free.
import_asskit_table πŸ”’
Imports a table from the Assembly Kit as a new file, or None if it can’t be imported.
insert_files πŸ”’
Inserts files into a pack, returning the paths of the ones inserted.
loaded_files_by_paths πŸ”’
Returns copies of the files of a pack at the provided paths, with their data loaded in memory.
pack_key_and_data_source πŸ”’
Returns the key of the pack of a file source (empty for other sources), and its data source.
paste_entries_from_paths πŸ”’
Expands the selected paths of a pack into entries to paste, one per file.
raw_paths πŸ”’
Returns the raw paths of container paths.
split_found πŸ”’
Resolves paths into container paths, splitting out the ones that match no file.
writable_file πŸ”’
Returns a file of an open pack, the game files or the parent packs, mutably.

Type AliasesΒ§

PathsByPack
Paths of files, by the key of their pack.