https://www.love2d.org/w/api.php?action=feedcontributions&user=Nucular&feedformat=atomLOVE - User contributions [en]2024-03-19T10:14:56ZUser contributionsMediaWiki 1.31.12https://www.love2d.org/w/index.php?title=love.filesystem&diff=16517love.filesystem2016-06-08T20:37:19Z<p>Nucular: Formatting</p>
<hr />
<div>Provides an interface to the user's filesystem.<br />
<br />
This module provides access to files in specific places:<br />
<br />
* The root folder of the .love archive (or source directory)<br />
* The root folder of the game's ''save directory''.<br />
* The folder ''containing'' the game's .love archive (or source directory), but only if [[love.filesystem.getSourceBaseDirectory|specific conditions]] are met.<br />
<br />
Each game is granted a single directory on the system where files can be saved through love.filesystem. This is the '''only directory''' where love.filesystem can write files. These directories will typically be found in something like:<br />
<br />
* Windows XP: <code>C:\Documents and Settings\user\Application Data\LOVE\</code> or <code>%appdata%\LOVE\</code><br />
* Windows Vista and 7: <code>C:\Users\user\AppData\Roaming\LOVE</code> or <code>%appdata%\LOVE\</code><br />
* Linux: <code>$XDG_DATA_HOME/love/</code> or <code>~/.local/share/love/</code><br />
* Mac: <code>/Users/user/Library/Application Support/LOVE/</code><br />
* Android: <code>/data/user/0/org.love2d.android/files/save/</code> or <code>/data/data/org.love2d.android/files/save/</code> (On Android there are various save locations. If these don't work then you can use <code>love.filesystem.getSaveDirectory()</code> to check.)<br />
<br />
Files that are opened for write or append will always be created in the save directory. The same goes for other operations that involve writing to the filesystem, like mkdir.<br />
<br />
Files that are opened for read will be looked for in the save directory, and then in the .love archive (in that order). So if a file with a certain filename (and path) exist in both the .love archive and the save folder, the one in the save directory takes precedence.<br />
<br />
Note: '''All''' paths are relative to the .love archive and save directory. (except for the get*Directory() calls)<br />
<br />
It is recommended to set your game's identity first in your [[Config Files|conf.lua]]. You can set it with [[love.filesystem.setIdentity]] as well.<br />
== Types ==<br />
{{#ask: [[Category:Types]] [[parent::love.filesystem]] [[Concept:Current]]<br />
| headers=hide<br />
| format=template<br />
| template=ListingFields<br />
| introtemplate=ListingIntro<br />
| outrotemplate=ListingOutro<br />
| ?Description<br />
| ?PrettySince<br />
| ?PrettyRemoved<br />
}}<br />
== Functions ==<br />
{{#ask: [[Category:Functions]] [[parent::love.filesystem]] [[Concept:Current]]<br />
| headers=hide<br />
| format=template<br />
| template=ListingFields<br />
| introtemplate=ListingIntro<br />
| outrotemplate=ListingOutro<br />
| ?Description<br />
| ?PrettySince<br />
| ?PrettyRemoved<br />
}}<br />
== Enums ==<br />
{{#ask: [[Category:Enums]] [[parent::love.filesystem]] [[Concept:Current]]<br />
| headers=hide<br />
| format=template<br />
| template=ListingFields<br />
| introtemplate=ListingIntro<br />
| outrotemplate=ListingOutro<br />
| ?Description<br />
| ?PrettySince<br />
| ?PrettyRemoved<br />
}}<br />
[[Category:Modules]]<br />
{{#set:Description=Provides an interface to the user's filesystem.}}<br />
== See Also ==<br />
* [[parent::love]]<br />
{{#set:Since=000}}<br />
== Other Languages ==<br />
{{i18n|love.filesystem}}</div>Nucularhttps://www.love2d.org/w/index.php?title=Template:Removed_new_feature&diff=16401Template:Removed new feature2016-05-16T02:07:16Z<p>Nucular: Added CSS class</p>
<hr />
<div><includeonly><br />
<div class='removed-new-feature' style='<br />
font-weight: bold;<br />
background: #ff9090;<br />
color: black;<br />
padding: 2px; <br />
padding-left: 8px;<br />
-webkit-border-top-left-radius: 10px;<br />
-webkit-border-top-right-radius: 10px;<br />
-moz-border-radius-topleft: 10px;<br />
-moz-border-radius-topright: 10px;<br />
border-top-left-radius: 10px;<br />
border-top-right-radius: 10px;'>Available since LÖVE [[{{{1}}}]] and removed in LÖVE [[{{{2}}}]]</div><div style='<br />
border: 2px solid #ff9090;<br />
padding: 3px;<br />
-webkit-border-bottom-right-radius: 10px;<br />
-webkit-border-bottom-left-radius: 10px;<br />
-moz-border-radius-bottomright: 10px;<br />
-moz-border-radius-bottomleft: 10px;<br />
border-bottom-right-radius: 10px;<br />
border-bottom-left-radius: 10px;'>{{{3}}} </div>{{#if: {{{4|}}} |{{#set:Since={{{5}}}}}}}{{#if: {{{5|}}} |{{#set:Removed={{{5}}}}}}}<br />
</includeonly><noinclude>Use this template for functions<br />
<br />
Test: start<br />
{{Removed new feature|0.8.0|0.9.0|<br />
This is normal text<br />
''' Bold '''<br />
* bullleted<br />
}}<br />
end<br />
[[Category:Utility templates]]<br />
</noinclude></div>Nucularhttps://www.love2d.org/w/index.php?title=Template:Removed_feature&diff=16400Template:Removed feature2016-05-16T02:07:11Z<p>Nucular: Added CSS class</p>
<hr />
<div><includeonly><br />
<div class='removed-feature' style='<br />
font-weight: bold;<br />
background: #ff9090;<br />
color: black;<br />
padding: 2px; <br />
padding-left: 8px;<br />
-webkit-border-top-left-radius: 10px;<br />
-webkit-border-top-right-radius: 10px;<br />
-moz-border-radius-topleft: 10px;<br />
-moz-border-radius-topright: 10px;<br />
border-top-left-radius: 10px;<br />
border-top-right-radius: 10px;'>Removed in LÖVE [[{{{1}}}]]</div><div style='<br />
border: 2px solid #ff9090;<br />
padding: 3px;<br />
-webkit-border-bottom-right-radius: 10px;<br />
-webkit-border-bottom-left-radius: 10px;<br />
-moz-border-radius-bottomright: 10px;<br />
-moz-border-radius-bottomleft: 10px;<br />
border-bottom-right-radius: 10px;<br />
border-bottom-left-radius: 10px;'>{{{2}}} </div>{{#if: {{{3|}}} |{{#set:Removed={{{3}}}}}}}<br />
</includeonly><noinclude>Use this template for functions<br />
<br />
Test: start<br />
{{Removed feature|0.8.0|<br />
This is normal text<br />
''' Bold '''<br />
* bullleted<br />
}}<br />
end<br />
[[Category:Utility templates]]<br />
</noinclude></div>Nucularhttps://www.love2d.org/w/index.php?title=Template:New_feature&diff=16399Template:New feature2016-05-16T02:07:05Z<p>Nucular: Added CSS class</p>
<hr />
<div><includeonly><br />
<div class='new-feature' style='<br />
font-weight: bold;<br />
background: #b0b0ff;<br />
color: black;<br />
padding: 2px; <br />
padding-left: 8px;<br />
-webkit-border-top-left-radius: 10px;<br />
-webkit-border-top-right-radius: 10px;<br />
-moz-border-radius-topleft: 10px;<br />
-moz-border-radius-topright: 10px;<br />
border-top-left-radius: 10px;<br />
border-top-right-radius: 10px;'>Available since LÖVE [[{{{1}}}]]</div><div style='<br />
border: 2px solid #b0b0ff;<br />
padding: 3px;<br />
-webkit-border-bottom-right-radius: 10px;<br />
-webkit-border-bottom-left-radius: 10px;<br />
-moz-border-radius-bottomright: 10px;<br />
-moz-border-radius-bottomleft: 10px;<br />
border-bottom-right-radius: 10px;<br />
border-bottom-left-radius: 10px;'>{{{2}}} </div>{{#if: {{{3|}}} |{{#set:Since={{{3}}}}}}}<br />
</includeonly><noinclude>Use this template for functions<br />
Test:<br />
{{New feature|0.8.0|<br />
This is normal text<br />
''' Bold '''<br />
* bullleted<br />
}}<br />
<br />
[[Category:Utility templates]]<br />
</noinclude></div>Nucularhttps://www.love2d.org/w/index.php?title=Template:oldin&diff=16398Template:oldin2016-05-16T02:06:59Z<p>Nucular: Added CSS class</p>
<hr />
<div><includeonly>{|class='removed-section' bgcolor='#ffacac' style='margin-top: 1em; padding: 3px; border-radius:5px; -moz-border-radius:5px;' data-oldin='{{{1}}}'<br />
|'' '''Removed in LÖVE {{{1}}}''' ''<br />
|-<br />
| <small>{{#if: {{{text|}}} |{{{text}}}|{{#if: {{{type|}}} |{{#if: {{{plural|}}} |These|This}} {{{type}}} |It}} {{#if: {{{plural|}}}|are|is}} not supported in that and later versions}}.</small><br />
|}<br />
{{#switch: {{{type}}} | callback | module | enum | function | method | type = {{#if: {{{2|}}}|{{#set:Removed={{{2}}}}}}}{{#if: {{{1|}}}|{{#set:PrettyRemoved={{{1}}}}}}}|}}</includeonly><noinclude><br />
{{documentation}}<br />
[[Category:Templates]]<br />
</noinclude></div>Nucularhttps://www.love2d.org/w/index.php?title=Template:newinoldin&diff=16397Template:newinoldin2016-05-16T02:06:51Z<p>Nucular: Added CSS class</p>
<hr />
<div><includeonly>{|class='removed-new-section' bgcolor='#ffacac' style='margin-top: 1em; padding: 3px; border-radius:5px; -moz-border-radius:5px;' data-newin='{{{1}}}; data-oldin='{{{3}}}'<br />
|'' '''Available since LÖVE {{{1}}} and removed in LÖVE {{{3}}}''' ''<br />
|-<br />
| <small>{{#if: {{{text|}}} |{{{text}}}|{{#if: {{{type|}}} |{{#if: {{{plural|}}} |These|This}} {{{type}}} |It}} {{#if: {{{plural|}}}|are|is}} not supported in earlier or later versions}}.</small><br />
|}<br />
{{#switch: {{{type}}} | callback | module | enum | function | method | type = {{#if: {{{2|}}} |{{#set:Since={{{2}}}}}}}{{#if: {{{1|}}} |{{#set:PrettySince={{{1}}}}}}}{{#if: {{{4|}}}|{{#set:Removed={{{4}}}}}}}{{#if: {{{3|}}}|{{#set:PrettyRemoved={{{3}}}}}}}|}}</includeonly><noinclude><br />
{{documentation}}<br />
[[Category:Templates]]<br />
</noinclude></div>Nucularhttps://www.love2d.org/w/index.php?title=Template:newin&diff=16396Template:newin2016-05-16T02:06:44Z<p>Nucular: Added CSS class</p>
<hr />
<div><includeonly>{|class='new-section' bgcolor='#d0d0ff' style='margin-top: 1em; padding: 3px; border-radius:5px; -moz-border-radius:5px;' data-newin='{{{1}}}'<br />
|'' '''Available since LÖVE {{{1}}}''' ''<br />
|-<br />
| <small>{{#if: {{{text|}}} |{{{text}}}|{{#if: {{{type|}}} |{{#if: {{{plural|}}} |These|This}} {{{type}}} |It}} {{#if: {{{plural|}}}|are|is}} not supported in earlier versions}}.</small><br />
|}<br />
{{#switch: {{{type}}} | callback | module | enum | function | method | type = {{#if: {{{2|}}} |{{#set:Since={{{2}}}}}}}{{#if: {{{1|}}} |{{#set:PrettySince={{{1}}}}}}}|}}</includeonly><noinclude><br />
{{documentation}}<br />
[[Category:Templates]]<br />
</noinclude></div>Nucularhttps://www.love2d.org/w/index.php?title=Template:notice&diff=16395Template:notice2016-05-16T02:06:32Z<p>Nucular: Added CSS class</p>
<hr />
<div><includeonly>{|class='notice' bgcolor='gold' style='border-style:solid;border-width:1px;-moz-border-radius:3px;border-radius:3px;' align='center' width='80%'<br />
|width='1'| [[Image:{{{icon|O.png}}}]]<br />
|textalign='right'|{{{1}}}<br />
|width='1'|&nbsp;<br />
|}<br></includeonly><noinclude><br />
{{documentation}}<br />
[[Category:Templates]]<br />
</noinclude></div>Nucularhttps://www.love2d.org/w/index.php?title=File:sfxr_lua.png&diff=13752File:sfxr lua.png2014-08-26T16:57:11Z<p>Nucular: uploaded a new version of &quot;File:sfxr lua.png&quot;</p>
<hr />
<div></div>Nucularhttps://www.love2d.org/w/index.php?title=sfxr.lua&diff=13751sfxr.lua2014-08-26T16:56:15Z<p>Nucular: Update</p>
<hr />
<div>{{#set:Name=sfxr.lua}}<br />
{{#set:LOVE Version=0.9.x}}<br />
{{#set:Description=Generate your sounds dynamically, at runtime}}<br />
'''sfxr.lua''' is a pure Lua port of the sfxr game sound generator. It performs fast enough for short sounds or pregenerated longer ones.<br />
<br />
[[File:sfxr_lua.png|400px|thumb|left|Screenshot]]<br />
<br />
This single-file library allows you to dynamically create retro sound effects based on game-defined parameters. It also comes with a demo application as shown above based on [[Löve Frames]].<br />
<br />
Usage example (plays a random sound on every keypress):<br />
<source lang="lua"><br />
local sfxr = require("sfxr")<br />
<br />
function love.keypressed(key, rep)<br />
local sound = sfxr.newSound()<br />
sound:randomize()<br />
sound:play()<br />
end<br />
</source><br />
<br />
It supports all 7 preset generators for Pickup/Coin, Laser/Shoot, Explosion, Power-Up, Hit/Hurt, Jump and Blip/Select sounds and also both a randomizing and a mutating function. It also has all parameters from the original synthesizer, including basic envelopes, frequency slides, vibrato, change, square duty sweeping, phaser effect, low and high pass filters and sweep repeating.<br />
<br />
You can also design sounds with the demo application and safe them either in<br />
a Lua-based format or the binary format of the original sfxr. Both formats can<br />
be loaded too, of course.<br />
<br />
* '''[https://github.com/nucular/sfxrlua Get the source from GitHub and collaborate]'''<br/><br />
* [https://github.com/nucular/sfxrlua/archive/master.zip Direct ZIP download]<br/><br />
* [https://github.com/nucular/sfxrlua/wiki Documentation Wiki]<br/><br />
* [http://love2d.org/forums/viewtopic.php?f=5&t=78053 Forum post]<br/><br />
<br />
[[Category:Libraries]]</div>Nucularhttps://www.love2d.org/w/index.php?title=sfxr.lua&diff=13541sfxr.lua2014-06-03T16:30:53Z<p>Nucular: whoops, forgot category</p>
<hr />
<div>{{#set:Name=sfxr.lua}}<br />
{{#set:LOVE Version=0.9.x}}<br />
{{#set:Description=A pure Lua port of the sfxr game sound generator}}<br />
'''sfxr.lua''' is a pure Lua port of the sfxr game sound generator. It still performs comparatively fast, though :P<br />
<br />
[[File:sfxr_lua.png|400px|thumb|left|Screenshot]]<br />
<br />
This single-file library allows you to dynamically create retro sound effects based on parameters from your code. It also comes with a demo application as shown above based on [[Löve Frames]].<br />
<br />
Usage example (plays a random sound on every keypress):<br />
<source lang="lua"><br />
local sfxr = require("sfxr")<br />
<br />
function love.keypressed(key, rep)<br />
local sound = sfxr.newSound()<br />
sound:randomize()<br />
sound:play()<br />
end<br />
</source><br />
<br />
It supports all 7 preset generators for Pickup/Coin, Laser/Shoot, Explosion, Power-Up, Hit/Hurt, Jump and Blip/Select sounds and also both a randomizing and a mutating function. It also has all parameters from the original synthesizer, including basic envelopes, frequency slides, vibrato, change, square duty sweeping, phaser effect, low and high pass filters and sweep repeating.<br />
<br />
* '''[https://github.com/nucular/sfxrlua Get the source from GitHub and collaborate]'''<br/><br />
* [https://github.com/nucular/sfxrlua/archive/master.zip Direct ZIP download]<br/><br />
* [https://github.com/nucular/sfxrlua/wiki Documentation Wiki]<br/><br />
* [http://love2d.org/forums/viewtopic.php?f=5&t=78053 Forum post]<br/><br />
<br />
[[Category:Libraries]]</div>Nucularhttps://www.love2d.org/w/index.php?title=sfxr.lua&diff=13540sfxr.lua2014-06-03T16:30:13Z<p>Nucular: Created page for sfxr.lua</p>
<hr />
<div>{{#set:Name=sfxr.lua}}<br />
{{#set:LOVE Version=0.9.x}}<br />
{{#set:Description=A pure Lua port of the sfxr game sound generator}}<br />
'''sfxr.lua''' is a pure Lua port of the sfxr game sound generator. It still performs comparatively fast, though :P<br />
<br />
[[File:sfxr_lua.png|400px|thumb|left|Screenshot]]<br />
<br />
This single-file library allows you to dynamically create retro sound effects based on parameters from your code. It also comes with a demo application as shown above based on [[Löve Frames]].<br />
<br />
Usage example (plays a random sound on every keypress):<br />
<source lang="lua"><br />
local sfxr = require("sfxr")<br />
<br />
function love.keypressed(key, rep)<br />
local sound = sfxr.newSound()<br />
sound:randomize()<br />
sound:play()<br />
end<br />
</source><br />
<br />
It supports all 7 preset generators for Pickup/Coin, Laser/Shoot, Explosion, Power-Up, Hit/Hurt, Jump and Blip/Select sounds and also both a randomizing and a mutating function. It also has all parameters from the original synthesizer, including basic envelopes, frequency slides, vibrato, change, square duty sweeping, phaser effect, low and high pass filters and sweep repeating.<br />
<br />
* '''[https://github.com/nucular/sfxrlua Get the source from GitHub and collaborate]'''<br/><br />
* [https://github.com/nucular/sfxrlua/archive/master.zip Direct ZIP download]<br/><br />
* [https://github.com/nucular/sfxrlua/wiki Documentation Wiki]<br/><br />
* [http://love2d.org/forums/viewtopic.php?f=5&t=78053 Forum post]<br/></div>Nucularhttps://www.love2d.org/w/index.php?title=File:sfxr_lua.png&diff=13539File:sfxr lua.png2014-06-03T16:05:49Z<p>Nucular: </p>
<hr />
<div></div>Nucular