sapling/eden/fs/utils
Xavier Deguillard f4f159537f utils: add a platform independent FileUtils
Summary:
Up to now, Windows had to have its own version of folly::{readFile, writeFile,
writeFileAtomic} as these only operate on `char *` path, which can only
represent ascii paths on Windows. Since the Windows version is slightly
different from folly, this forced the code to either ifdef _WIN32, or use the
folly version pretending that it would be OK. The Windows version was also
behaving slightly differently from folly. For instance, where folly would
return a boolean to indicate success, on Windows we would throw an exception.

To simplify our code, add type safety and unify both, we can implement our own
wrappers on top of either folly or Windows APIs.

We still have some code that uses folly::readFile but these should only be
dealing with filedescriptors. As a following step, we may want to have our own
File class that wraps a file descriptor/HANDLE so we can completely remove all
uses of folly::readFile.

Reviewed By: wez

Differential Revision: D23037325

fbshipit-source-id: 2b9a026f3ee6220ef55097abe649b23e38d9fe91
2020-08-14 18:56:33 -07:00
..
test utils: add a platform independent FileUtils 2020-08-14 18:56:33 -07:00
BucketedLog.h Tidy up license headers 2019-10-11 05:28:23 -07:00
Bug.cpp refactor the EDEN_BUG() macro 2019-11-22 15:38:33 -08:00
Bug.h Remove folly's ColdClass, which was of dubious utility 2020-01-09 13:09:56 -08:00
ChronoParse.cpp Replace Folly Format with fmt in logger to reduce binary size 2019-11-18 05:53:08 -08:00
ChronoParse.h Tidy up license headers 2019-10-11 05:28:23 -07:00
ChronoUnit.cpp Tidy up license headers 2019-10-11 05:28:23 -07:00
ChronoUnit.gperf update license header in remaining files 2019-06-19 17:02:46 -07:00
ChronoUnit.h Tidy up license headers 2019-10-11 05:28:23 -07:00
Clock.cpp add uptime field to DaemonInfo 2020-05-11 11:42:15 -07:00
Clock.h add uptime field to DaemonInfo 2020-05-11 11:42:15 -07:00
CMakeLists.txt disable pthread cancellation on the FuseChannel threads 2020-05-08 20:41:50 -07:00
CoverageSet.cpp Tidy up license headers 2019-10-11 05:28:23 -07:00
CoverageSet.h Tidy up license headers 2019-10-11 05:28:23 -07:00
DirType.cpp assert that the dtype constants have consistent values on all platforms 2020-04-28 13:23:52 -07:00
DirType.h Cleaning up second definitions of dtype_t 2020-03-10 12:27:51 -07:00
EnumValue.h add enumValue utility function 2020-04-28 17:41:24 -07:00
FaultInjector.cpp build deprecation-clean 2019-11-12 16:31:54 -08:00
FaultInjector.h Tidy up license headers 2019-10-11 05:28:23 -07:00
FileUtils.cpp utils: add a platform independent FileUtils 2020-08-14 18:56:33 -07:00
FileUtils.h utils: add a platform independent FileUtils 2020-08-14 18:56:33 -07:00
Future.h add a collectSafe function 2020-02-03 11:30:50 -08:00
FutureSubprocess.cpp Tidy up license headers 2019-10-11 05:28:23 -07:00
FutureSubprocess.h Tidy up license headers 2019-10-11 05:28:23 -07:00
FutureUnixSocket.cpp Tidy up license headers 2019-10-11 05:28:23 -07:00
FutureUnixSocket.h Tidy up license headers 2019-10-11 05:28:23 -07:00
IDGen.cpp Tidy up license headers 2019-10-11 05:28:23 -07:00
IDGen.h Tidy up license headers 2019-10-11 05:28:23 -07:00
IoFuture.cpp Tidy up license headers 2019-10-11 05:28:23 -07:00
IoFuture.h Tidy up license headers 2019-10-11 05:28:23 -07:00
LazyInitialize.h Tidy up license headers 2019-10-11 05:28:23 -07:00
LeaseCache.h Tidy up license headers 2019-10-11 05:28:23 -07:00
MappedDiskVector.h make deleted default constructors explicit 2020-04-14 12:47:03 -07:00
Memory.h Tidy up license headers 2019-10-11 05:28:23 -07:00
PathFuncs.cpp Merge Windows and POSIX version of TestMounts 2020-04-23 12:41:48 -07:00
PathFuncs.h win: simplify path management 2020-08-10 08:53:13 -07:00
PathMap.h Update the PathMap::find to do a case insensitive search on Windows 2020-04-24 12:46:19 -07:00
ProcessAccessLog.cpp Migrate to field_ref Thrift API 2020-07-21 11:23:35 -07:00
ProcessAccessLog.h use enumValue instead of static_cast<int> 2020-04-28 18:59:34 -07:00
ProcessNameCache.cpp add space between command name and args when logging fetch heavy processes to Scuba 2020-07-31 11:42:51 -07:00
ProcessNameCache.h add space between command name and args when logging fetch heavy processes to Scuba 2020-07-31 11:42:51 -07:00
ProcUtil.cpp utils: add a platform independent FileUtils 2020-08-14 18:56:33 -07:00
ProcUtil.h utils: add a platform independent FileUtils 2020-08-14 18:56:33 -07:00
ServiceAddress.cpp Mark getSelection APIs deprecated 2020-08-11 12:34:15 -07:00
ServiceAddress.h Tidy up license headers 2019-10-11 05:28:23 -07:00
SortedInsert.h Tidy up license headers 2019-10-11 05:28:23 -07:00
SSLContext.cpp Tidy up license headers 2019-10-11 05:28:23 -07:00
SSLContext.h Tidy up license headers 2019-10-11 05:28:23 -07:00
StatTimes.h eden: add stattimes helpers for win32 2020-04-24 15:57:27 -07:00
Synchronized.h Tidy up license headers 2019-10-11 05:28:23 -07:00
SystemError.h Tidy up license headers 2019-10-11 05:28:23 -07:00
Thread.cpp disable pthread cancellation on the FuseChannel threads 2020-05-08 20:41:50 -07:00
Thread.h disable pthread cancellation on the FuseChannel threads 2020-05-08 20:41:50 -07:00
TimeUtil.cpp Tidy up license headers 2019-10-11 05:28:23 -07:00
TimeUtil.h Tidy up license headers 2019-10-11 05:28:23 -07:00
UnboundedQueueExecutor.cpp Tidy up license headers 2019-10-11 05:28:23 -07:00
UnboundedQueueExecutor.h Tidy up license headers 2019-10-11 05:28:23 -07:00
UnixSocket.cpp warn on unused exception parameter 2019-10-28 17:49:23 -07:00
UnixSocket.h Tidy up license headers 2019-10-11 05:28:23 -07:00
UserInfo.cpp move UserInfo to eden/fs/utils/ 2020-04-29 17:21:12 -07:00
UserInfo.h move UserInfo to eden/fs/utils/ 2020-04-29 17:21:12 -07:00
Utf8.cpp add some utf-8 helper functions 2020-06-10 19:29:51 -07:00
Utf8.h add some utf-8 helper functions 2020-06-10 19:29:51 -07:00
XAttr.cpp Tidy up license headers 2019-10-11 05:28:23 -07:00
XAttr.h Tidy up license headers 2019-10-11 05:28:23 -07:00