Nativeimplementation of read file