file::read_{first,last}() implementation.