[erlang-questions] Location options in file:pread/2 and /3

Zvi <>
Thu May 8 05:33:15 CEST 2008


Bjorn,

yes I was opening file in raw mode.

BR,
Zvi


Bjorn Gustavsson wrote:
> 
> Zvi <> writes:
> 
>> Are all these options are still supported in file:pread/2 and
>> file:pread/3 ?
>> >From my tests, only file:position accepts them. file:pread/2 and /3 only
>> accepts Offset and giving {error,badarg} for the rest.
> 
> They are accepted if the file has not been opened in raw mode.
> There is a note about that in the documentation for pread/3:
> 
> "If IoDevice has been opened in raw mode, some restrictions apply:
> Location is only allowed to be an integer; and the current position of the
> file is undefined after the operation."
> 
> /Bjorn
> -- 
> Björn Gustavsson, Erlang/OTP, Ericsson AB
> _______________________________________________
> erlang-questions mailing list
> 
> http://www.erlang.org/mailman/listinfo/erlang-questions
> 
> 

-- 
View this message in context: http://www.nabble.com/Location-options-in-file%3Apread-2-and--3-tp16834826p17117871.html
Sent from the Erlang Questions mailing list archive at Nabble.com.




More information about the erlang-questions mailing list