2,732
edits
Red Leader (talk | contribs) (→Functions: Start seek()) |
Red Leader (talk | contribs) (→seek(): More doc) |
||
Line 278: | Line 278: | ||
=== seek() === | === seek() === | ||
{{Nasal doc | {{Nasal doc | ||
|syntax = io.seek( | |syntax = io.seek(file, position, whence); | ||
|text = | |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 = | ||
}} | }} |