I am using
and what is interesting is that st_size
is bigger than the value returned after read()
?
st.st_size
returns 644
- read()
returns 606
,
Any thoughts?
Size of file and size of stream may not match. For example, when you open file in text mode, OS can translate multi-byte EOL sequences into single char. This is usually visible on Windows, but if you have a Windows file on Linux, the effect can be the same.