Difference between revisions of "love.filesystem.setIdentity"

(Added new 0.9.0 variant with search order)
Line 8: Line 8:
 
=== Arguments ===
 
=== Arguments ===
 
{{param|string|name|The new identity that will be used as write directory}}
 
{{param|string|name|The new identity that will be used as write directory}}
 +
=== Returns ===
 +
Nothing.
 +
== Function ==
 +
{{newin|[[0.9.0]]|090|type=variant}}
 +
=== Synopsis ===
 +
<source lang="lua">
 +
love.filesystem.setIdentity( name, searchorder )
 +
</source>
 +
=== Arguments ===
 +
{{param|string|name|The new identity that will be used as write directory}}
 +
{{param|SearchOrder|searchorder ("first")|Whether love.filesystem will look for files in the write directory before or after looking in the main game source.}}
 
=== Returns ===
 
=== Returns ===
 
Nothing.
 
Nothing.

Revision as of 18:17, 11 August 2013

Sets the write directory for your game. Note that you can only set the name of the folder to store your files in, not the location.

Function

Synopsis

love.filesystem.setIdentity( name )

Arguments

string name
The new identity that will be used as write directory

Returns

Nothing.

Function

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

Synopsis

love.filesystem.setIdentity( name, searchorder )

Arguments

string name
The new identity that will be used as write directory
SearchOrder searchorder ("first")
Whether love.filesystem will look for files in the write directory before or after looking in the main game source.

Returns

Nothing.

Examples

Setting the game folder name

-- Yes:
love.filesystem.setIdentity("monkey_doom_2")
-- No: 
-- love.filesystem.setIdentity("c:/Users/bob/monkey_doom_2")

See Also


Other Languages