mirror of
https://github.com/facebook/sapling.git
synced 2024-10-10 08:47:12 +03:00
f4f159537f
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 |
||
---|---|---|
.. | ||
benchharness | ||
benchmarks | ||
cli | ||
config | ||
docs | ||
fuse | ||
inodes | ||
journal | ||
model | ||
monitor | ||
notifications | ||
py | ||
rocksdb | ||
service | ||
sqlite | ||
store | ||
takeover | ||
telemetry | ||
testharness | ||
third-party | ||
utils | ||
win | ||
CMakeLists.txt |