Difference between revisions of "File"

Line 8: Line 8:
 
== Functions ==
 
== Functions ==
 
These functions have parentheses in odd places. This is because the ''File:'' namespace is reserved in Mediawiki.
 
These functions have parentheses in odd places. This is because the ''File:'' namespace is reserved in Mediawiki.
{{#ask: [[Category:Functions]] [[parent::File]] OR [[parent::Object]] [[Since::<071]]
+
{{#ask: [[Category:Functions]] [[parent::File||Object]] [[Since::<071]]
 
| headers=hide
 
| headers=hide
 
| ?Description
 
| ?Description

Revision as of 17:36, 25 March 2011

Represents a file on the filesystem.

Constructors

love.filesystem.newFileCreates a new File object.

Functions

These functions have parentheses in odd places. This is because the File: namespace is reserved in Mediawiki.

(File):closeCloses a File.
(File):eofIf the end-of-file has been reached
(File):getSizeReturns the file size.
(File):linesIterate over all the lines in a file.
(File):openOpen the file for write, read or append.
(File):readRead a number of bytes from a file
(File):seekSeek to a position in a file
(File):tellReturns the position in the file.
(File):writeWrite data to a file.
Object:typeGets the type of the object as a string.
Object:typeOfChecks whether an object is of a certain type.

Enums

FileModeThe different modes you can open a File in.

Supertypes

Object

See Also


Other Languages