Difference between revisions of "love.filesystem.setIdentity"

m (Function: Updated optional second argument)
m (Small improvements.)
Line 7: Line 7:
 
</source>
 
</source>
 
=== 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 ===
 
=== Returns ===
 
Nothing.
 
Nothing.
Line 17: Line 17:
 
</source>
 
</source>
 
=== 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.}}
{{param|boolean|appendToPath (false)|Whether the identity directory will be searched when reading a filepath before or after the game's source directory and any archives currently mounted with [[love.filesystem.mount]].}}
+
{{param|boolean|appendToPath (false)|Whether the identity directory will be searched when reading a filepath before or after the game's source directory and any currently [[love.filesystem.mount|mounted]] archives.}}
 
=== Returns ===
 
=== Returns ===
 
Nothing.
 
Nothing.
Line 28: Line 28:
 
love.filesystem.setIdentity("monkey_doom_2")
 
love.filesystem.setIdentity("monkey_doom_2")
 
-- No:  
 
-- No:  
-- love.filesystem.setIdentity("c:/Users/bob/monkey_doom_2")
+
love.filesystem.setIdentity("c:/Users/bob/monkey_doom_2")
 
</source>
 
</source>
 
== See Also ==
 
== See Also ==
 
* [[parent::love.filesystem]]
 
* [[parent::love.filesystem]]
 +
* [[love.filesystem.getIdentity]]
 
[[Category:Functions]]
 
[[Category:Functions]]
 
{{#set:Description=Sets the write directory for your game.}}
 
{{#set:Description=Sets the write directory for your game.}}

Revision as of 12:52, 22 December 2014

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, appendToPath )

Arguments

string name
The new identity that will be used as write directory.
boolean appendToPath (false)
Whether the identity directory will be searched when reading a filepath before or after the game's source directory and any currently mounted archives.

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