You do not have permission to delete messages in this group
Copy link
Report message
Sign in to report message
Show original message
Either email addresses are anonymous for this group or you need the view member email addresses permission to view the original message
to julia-users
Is there an fseek in Julia which returns to an offset from the beginning of the buffer during a binary file read? Would seekstart followed by seek or skip work? I understand that stream is not the same as file in read()? Thanks
James Gilbert
unread,
Nov 29, 2015, 4:38:11 AM11/29/15
Reply to author
Sign in to reply to author
Forward
Sign in to forward
Delete
You do not have permission to delete messages in this group
Copy link
Report message
Sign in to report message
Show original message
Either email addresses are anonymous for this group or you need the view member email addresses permission to view the original message
to julia-users
I believe that in seek(s, pos), pos is the absolute position from the start of the stream, and in skip(s, offset), offset is relative to the current position.
A "stream" can be any IO type, such as a file on disk or an IOBuffer in memory.
Rajn
unread,
Nov 29, 2015, 10:41:00 PM11/29/15
Reply to author
Sign in to reply to author
Forward
Sign in to forward
Delete
You do not have permission to delete messages in this group
Copy link
Report message
Sign in to report message
Show original message
Either email addresses are anonymous for this group or you need the view member email addresses permission to view the original message
to julia-users
Thanks James for pointing it out. It did work. Is there a need for a C++ like function fseek in that case at all?
Stefan Karpinski
unread,
Nov 30, 2015, 9:55:15 AM11/30/15
Reply to author
Sign in to reply to author
Forward
Sign in to forward
Delete
You do not have permission to delete messages in this group
Copy link
Report message
Sign in to report message
Show original message
Either email addresses are anonymous for this group or you need the view member email addresses permission to view the original message
to Julia Users
No, seek does what the clib fseek function does. The only reason fseek starts with an "f" is because it belongs to the family of higher level file operations that all start with "f" – fopen, fclose, etc.