[erlang-questions] position in file:pread/2
Ulf Wiger
ulf@REDACTED
Mon Dec 11 19:21:38 CET 2006
In the 'file' manual, pread/2 is defined as performing a
sequence of pread/3 in one operation. It takes a list
of Location elements, where the meaning of Location is
as for file:position/2.
The problem is that Location is defined to allow relative
offset, while pread/3 clearly states that the current
position of the file is undefined after a pread/3 call.
So what then is the expected outcome of a call to pread/2
with a list of relative location elements? Undefined?
The documentation shouldn't leave us guessing.
The same goes for pwrite/2 and pwrite/3.
BR,
Ulf W
More information about the erlang-questions
mailing list