love.filesystem.mount

love.filesystem.mount

Available since LÖVE 0.9.0
This function is not supported in earlier versions.

Mounts a zip file or folder in the game's save directory for reading.

Function

Synopsis

success = love.filesystem.mount( archive, mountpoint )

Arguments

string archive
The folder or zip file in the game's save directory to mount.
string mountpoint
The new path the archive will be mounted to.

Returns

boolean success
True if the archive was successfully mounted, false otherwise.

Function

Synopsis

success = love.filesystem.mount( archive, mountpoint, appendToPath )

Arguments

string archive
The folder or zip file in the game's save directory to mount.
string mountpoint
The new path the archive will be mounted to.
boolean appendToPath (false)
Whether the archive will be searched when reading a filepath before or after already-mounted archives. This includes the game's source and save directories.

Returns

boolean success
True if the archive was successfully mounted, false otherwise.

Examples

Mount a zip file.

-- Assuming content.zip exists in the game's save directory and contains a file called 'myimage.png'.
love.filesystem.mount("content.zip", "content")
 
assert(love.filesystem.exists("content/myimage.png"))

See Also

© 2006–2016 LÖVE Development Team
Licensed under the GNU Free Documentation License, Version 1.3.
https://love2d.org/wiki/love.filesystem.mount

在线笔记
App下载
App下载

扫描二维码

下载编程狮App

公众号
微信公众号

编程狮公众号

意见反馈
返回顶部