MCPcopy Create free account
hub / github.com/AutoHotkey/AutoHotkey / Length

Method Length

source/TextIO.h:270–283  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

268 return (pos == -1) ? -1 : pos + (mPos ? mPos - (mBuffer + mLength) : (ptrdiff_t)mLength);
269 }
270 __int64 Length()
271 {
272 __int64 len = _Length();
273 if (!mPos && mLength) // mBuffer contains data to write.
274 {
275 // Not len+mLength, since we might not be writing at the end of the file.
276 // Return the current position plus the amount of buffered data, except
277 // when that falls short of the current actual length of the file.
278 __int64 buf_end = _Tell() + mLength;
279 if (buf_end > len)
280 return buf_end;
281 }
282 return len;
283 }
284 __int64 Length(__int64 aLength)
285 {
286 // Truncating the file may mean discarding some of the data in the buffer:

Callers

nothing calls this directly

Calls

no outgoing calls

Tested by

no test coverage detected