Garry's Mod Wiki

File:Seek

File:Seek

  File:Seek( number pos )

Description

Sets the file pointer to the specified position.

Arguments

1 number pos
Pointer position, in bytes.

Example

local f = file.Open( "test.txt", "w", "DATA" ) f:WriteFloat( math.pi ) f:WriteFloat( 66.99 ) f:Close() local f = file.Open( "test.txt", "r", "DATA" ) f:Seek( 4 ) print( f:ReadFloat() ) -- Prints 66.98999786377 f:Close()

Special Pages


Wikis

?

Render Time: 32ms

DB GetPage 2
Generate Html 2
SaveChanges (1) 8
Render Body 0
Render Sidebar 18