Difference between revisions of "File"

m
(Grammatical mistake!)
Line 20: Line 20:
 
* [[parent::love.filesystem]]
 
* [[parent::love.filesystem]]
 
[[Category:Types]]
 
[[Category:Types]]
{{#set:Description=Represents an file on the filesystem.}}
+
{{#set:Description=Represents a file on the filesystem.}}

Revision as of 02:13, 28 July 2010

Represents a file on the filesystem.

Constructors

love.filesystem.newFileCreates a new File object.
love.filesystem.openFileOpens a new File object, which represents an existing or new file on disk.

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):flushFlushes any buffered written data in the file to disk.
(File):getBufferGets the buffer mode of a file.
(File):getFilenameGets the filename that the File object was created with.
(File):getModeGets the FileMode the file has been opened with.
(File):getSizeReturns the file size.
(File):isEOFGets whether end-of-file has been reached.
(File):isOpenGets whether the file is open.
(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):setBufferSets the buffer mode for a file opened for writing or appending.
(File):tellReturns the position in the file.
(File):writeWrite data to a file.
BezierCurveA Bézier curve object that can evaluate and render Bézier curves of arbitrary degree.
BodyBodies are objects with velocity and position.
ByteDataData object containing arbitrary bytes in an contiguous memory.
CanvasOff-screen render target.
Canvas (Nederlands)Off-screen render target.
ChainShapeA ChainShape consists of multiple line segments.
ChannelAn object which can be used to send and receive data between different threads.
CircleShapeCircle extends Shape and adds a radius and a local position.
CompressedDataByte data compressed using a specific algorithm.
CompressedImageDataCompressed image data designed to stay compressed in RAM and on the GPU.
ContactContacts are objects created to manage collisions in worlds.
CursorRepresents a hardware cursor.
DataThe superclass of all data.
DecoderAn object which can gradually decode a sound file.
DistanceJointKeeps two bodies at the same distance.
DrawableSuperclass for all things that can be drawn on screen.
DroppedFileRepresents a file dropped from the window.
EdgeShapeEdgeShape is a line segment.
FileRepresents a file on the filesystem.
FileDataData representing the contents of a file.
FixtureFixtures attach shapes to bodies.
FontDefines the shape of characters than can be drawn onto the screen.
FontDataA FontData represents a font.
FramebufferOff-screen render target.
FrictionJointA FrictionJoint applies friction to a body.
GearJointKeeps bodies together in such a way that they act like gears.
GlyphDataA GlyphData represents a drawable symbol of a font.
GraphicsBufferLow-level data stored in graphics memory, including arrays of vertices, vertex indices, and custom collections of data accessible in Shaders.
ImageDrawable image type.
ImageDataRaw (decoded) image data.
JointAttach multiple bodies together to interact in unique ways.
JoystickRepresents a physical joystick.
MeshA 2D polygon mesh used for drawing arbitrary textured shapes.
MotorJointControls the relative motion between two Bodies
... further results

Enums

BufferModeBuffer modes for File objects.
FileModeThe different modes you can open a File in.

See Also