2017-02-16 57 views

回答

9

看起来你正在寻找的seek功能在不同的点读:

help?> seek 
search: seek seekend seekstart ParseError setenv select select! selectperm 

    seek(s, pos) 

    Seek a stream to the given position. 

尤其是你可能要

open(filename) do f 
    seek(f, n) # seek past nth byte 
    read(f, m) # read m bytes 
end 

还有skip功能可能会有用

help?> skip 
search: skip skipchars 

    skip(s, offset) 

    Seek a stream relative to the current position.