file.Open
Example
Open a file in read only mode, reads a line, tells where the current file pointer is at and then closes the file handle.
local f = file.Open( "cfg/mapcycle.txt", "r", "MOD" )
print( f:ReadLine() )
print( f:ReadLine() )
print( f:Tell() )
f:Close()
Output:
//
// Default mapcycle file for Garry's Mod.
45