sapling/eden/fs
Zeyi (Rice) Fan a4d520acc6 replace os.path with pathlib in redirect
Summary:
The mix use of `os.path` and `pathlib` in `redirect.py` is a little messy, which is making adding Windows support trickier since `os.path` functions do not accept `Path` until 3.8. So before I make the change I think it's better to clean it up.

Since we are target Python 3 nowadays, replacing `os.path` with `pathlib` seems to be better. Basically this diff does the following:

* Replace use of `os.path` functions with the counterpart in `pathlib`.
* Reduce unnecessary conversions from/to `Path` to `str` / `bytes`.
* Only convert `Path` to `str` or `bytes` when interactive with other APIs (Thrift or os)
  * Cross-platform APIs: `os.fspath`
  * API expecting `str`: `os.fsdecode`
  * API expecting `bytes`: `os.fsencode`

Reviewed By: chadaustin

Differential Revision: D22879004

fbshipit-source-id: a247973dc9919c8805daa4046472124310725516
2020-08-05 14:27:04 -07:00
..
benchharness add 4k random writes benchmark 2020-07-14 16:13:37 -07:00
benchmarks add 4k random writes benchmark 2020-07-14 16:13:37 -07:00
cli replace os.path with pathlib in redirect 2020-08-05 14:27:04 -07:00
config Migrate to field_ref Thrift API 2020-07-21 11:23:35 -07:00
docs Some minor modifications to verbiage in documentation 2020-07-06 22:20:17 -07:00
fuse eden: macos: avoid blocking mount(2) call with osxfuse 3.11.0 2020-08-04 23:34:41 -07:00
inodes win: compute sha1 in constant memory 2020-08-04 23:00:11 -07:00
journal Migrate to field_ref Thrift API 2020-07-28 14:32:44 -07:00
model model: report symlink/executable as regular files on Windows 2020-05-12 08:46:35 -07:00
monitor enable log rotation in edenfs_monitor 2020-05-07 20:05:46 -07:00
notifications eden: show desktop notification for blob/tree fetch errors 2020-02-10 08:28:49 -08:00
py thrift: do not test for socket before connecting to it 2020-07-22 15:37:14 -07:00
rocksdb Remove dead includes in eden 2019-10-11 16:45:01 -07:00
service Join outstanding requests when stopWorkersOnStopListening is disabled 2020-08-05 10:04:14 -07:00
sqlite silence some msvc warnings from sqlite.{h,cpp} 2020-04-26 21:14:24 -07:00
store record fetch in HgQueuedBackingStore 2020-08-04 06:50:45 -07:00
takeover Migrate to field_ref Thrift API 2020-07-21 11:23:35 -07:00
telemetry win: when creating a file/directory, create the parents too 2020-07-29 12:17:17 -07:00
testharness make rename explicit about kernel cache invalidation 2020-07-28 14:47:40 -07:00
third-party eden: support NO_OPEN support on macOS 2020-07-27 17:53:03 -07:00
utils add space between command name and args when logging fetch heavy processes to Scuba 2020-07-31 11:42:51 -07:00
win win: compute sha1 in constant memory 2020-08-04 23:00:11 -07:00
CMakeLists.txt revert: Run Eden as a Windows service 2020-05-28 09:01:03 -07:00