wesnoth/data/lua/core/filesystem.lua
Celtic Minstrel 45cb8dc428 Add a filesystem module
This currently contains have_file, read_file, canonical_path, get_image_size, and new functions that work with binary_path files.
2021-05-11 14:52:21 -04:00

16 lines
688 B
Lua

--[========[File Handling]========]
print("Loading filesystem module...")
filesystem.asset_type = {
IMAGE = 'images',
SOUND = 'sounds',
MUSIC = 'music',
MAP = 'maps',
}
wesnoth.have_file = wesnoth.deprecate_api('wesnoth.have_file', 'filesystem.have_file', 1, nil, filesystem.have_file)
wesnoth.read_file = wesnoth.deprecate_api('wesnoth.read_file', 'filesystem.read_file', 1, nil, filesystem.read_file)
wesnoth.canonical_path = wesnoth.deprecate_api('wesnoth.canonical_path', 'filesystem.canonical_path', 1, nil, filesystem.canonical_path)
wesnoth.get_image_size = wesnoth.deprecate_api('wesnoth.get_image_size', 'filesystem.image_size', 1, nil, filesystem.image_size)