Nasal library/io: Difference between revisions

→‎seek(): More doc
(→‎Functions: Start seek())
(→‎seek(): More doc)
Line 278: Line 278:
=== seek() ===
=== seek() ===
{{Nasal doc
{{Nasal doc
|syntax = io.seek(filehandle, position, whence);
|syntax = io.seek(file, position, whence);
|text = As ANSI fseek(). Attempts to seek to the specified position based on the whence value (which must be one of io.SEEK_SET, io.SEEK_END, or io.SEEK_CUR).
|text = Moves the pointer position to a specified place.
|param1 = file
|param1 = file
|param1text =  
|param1text = File object as returned by {{func link|open()}}.
|param2 =  
|param2 = position
|param2text =  
|param2text = Number of bytes offset from '''whence''' as an integer. If '''whence''' is {{func link|SEEK_SET}}, this cannot be negative.
|param3 =  
|param3 = whence
|param3text =  
|param3text = Specifies position to set the offset from. Must be one of {{func link|SEEK_SET}} (beginning of file), {{func link|SEEK_END}} (end of file), or {{func link|SEEK_CUR}} (current pointer position).
|example1 =  
|example1 =  
}}
}}