Difference between revisions of "love.filesystem.unmount"
(Created page) |
(Using love.filesystem.getInfo instead of love.filesystem.exists) |
||
Line 16: | Line 16: | ||
-- Assuming content.zip exists in the game's save directory and contains a file called 'myimage.png'. | -- Assuming content.zip exists in the game's save directory and contains a file called 'myimage.png'. | ||
love.filesystem.mount("content.zip", "content") | love.filesystem.mount("content.zip", "content") | ||
− | assert(love.filesystem. | + | assert(love.filesystem.getInfo("content/myimage.png")) |
love.filesystem.unmount("content.zip") | love.filesystem.unmount("content.zip") | ||
− | assert(not love.filesystem. | + | assert(not love.filesystem.getInfo("content/myimage.png")) |
</source> | </source> | ||
+ | |||
== See Also == | == See Also == | ||
* [[parent::love.filesystem]] | * [[parent::love.filesystem]] |
Latest revision as of 18:31, 1 July 2018
Available since LÖVE 0.9.0 |
This function is not supported in earlier versions. |
Unmounts a zip file or folder previously mounted for reading with love.filesystem.mount.
Contents
Function
Synopsis
success = love.filesystem.unmount( archive )
Arguments
string archive
- The folder or zip file in the game's save directory which is currently mounted.
Returns
boolean success
- True if the archive was successfully unmounted, false otherwise.
Examples
Mount a zip file and then unmount it.
-- 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.getInfo("content/myimage.png"))
love.filesystem.unmount("content.zip")
assert(not love.filesystem.getInfo("content/myimage.png"))
See Also
Other Languages
Dansk –
Deutsch –
English –
Español –
Français –
Indonesia –
Italiano –
Lietuviškai –
Magyar –
Nederlands –
Polski –
Português –
Română –
Slovenský –
Suomi –
Svenska –
Türkçe –
Česky –
Ελληνικά –
Български –
Русский –
Српски –
Українська –
עברית –
ไทย –
日本語 –
正體中文 –
简体中文 –
Tiếng Việt –
한국어
More info