Difference between revisions of "love.filesystem.newFileData"

m (Add link to nil page.)
m (Replace newin with PrettySince)
Line 1: Line 1:
{{newin|[[0.7.0]]|070|type=function}}
 
 
Creates a new [[FileData]] object.
 
Creates a new [[FileData]] object.
  
Line 32: Line 31:
 
[[Category:Functions]]
 
[[Category:Functions]]
 
{{#set:Description=Creates a new [[FileData]] object.}}
 
{{#set:Description=Creates a new [[FileData]] object.}}
 +
{{#set:Since=000}}
 +
{{#set:PrettySince=0.7.0}}
 
== Other Languages ==
 
== Other Languages ==
 
{{i18n|love.filesystem.newFileData}}
 
{{i18n|love.filesystem.newFileData}}

Revision as of 10:17, 27 December 2015

Creates a new FileData object.

Function

Synopsis

data = love.filesystem.newFileData( contents, name, decoder )

Arguments

string contents
The contents of the file.
string name
The name of the file.
FileDecoder decoder ("file")
The method to use when decoding the contents.

Returns

FileData data
Your new FileData.

Function

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

Creates a new FileData from a file on the hard drive.

Synopsis

data, err = love.filesystem.newFileData( filepath )

Arguments

string filepath
Path to the file.

Returns

FileData data
The new FileData, or nil if an error occurred.
string err
The error string, if an error occurred.

See Also


Other Languages