简体   繁体   中英

Erlang: How to get current file cursor position

In Erlang, the file module allows one to move the file cursor to a given position by file:position/2 . But after performing an operation such as file:read_line/1 , the cursor now moves.

Is there any way to get its current location?

Sorry if this seems silly, I'm new to Erlang and I cannot seem to find any relevant function in the module documentation to perform this. Any help will be much appreciated.

要获取当前文件位置,请使用原子cur作为第二个参数调用file:position/2

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM