Add missing FileUtil functions (p?readvFull, p?writevFull) , add test
authorTudor Bosman <tudorb@fb.com>
Thu, 9 May 2013 21:16:35 +0000 (14:16 -0700)
committerSara Golemon <sgolemon@fb.com>
Mon, 20 May 2013 18:01:27 +0000 (11:01 -0700)
commitbfd3d062d6b4f4d88de838d639facda105043380
treea2e691bb3e502f437e35fe316c24c0b23bdc9270
parentd10b650899b3caac08364fb888740bcb762dc7f7
Add missing FileUtil functions (p?readvFull, p?writevFull) , add test

Summary:
Testing incomplete reads / writes is hard, so I'm only testing the wrappers
(template functions that take the underlying operation and retry it in
case of incomplete operations).  Note the cute hack of using variadic
templates to use the same wrapper for both file pointer- and explicit-position
flavors of the functions (the offset argument becomes optional).

Test Plan: test added

Reviewed By: lucian@fb.com

FB internal diff: D806781
folly/FileUtil.cpp
folly/FileUtil.h
folly/detail/FileUtilDetail.h [new file with mode: 0644]
folly/test/FileUtilTest.cpp [new file with mode: 0644]