Difference between revisions of "love.filesystem.newFileData"
(Added new variant) |
m (Add link to nil page.) |
||
Line 24: | Line 24: | ||
{{param|string|filepath|Path to the file.}} | {{param|string|filepath|Path to the file.}} | ||
=== Returns === | === Returns === | ||
− | {{param|FileData|data|The new FileData, or nil if an error occurred.}} | + | {{param|FileData|data|The new FileData, or [[nil]] if an error occurred.}} |
{{param|string|err|The error string, if an error occurred.}} | {{param|string|err|The error string, if an error occurred.}} | ||
Revision as of 01:05, 9 February 2015
Available since LÖVE 0.7.0 |
This function is not supported in earlier versions. |
Creates a new FileData object.
Contents
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
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