Add cross-platform read/write.