summaryrefslogtreecommitdiffstats
path: root/platform_utils.py
Commit message (Collapse)AuthorAgeFilesLines
* Implement islink, readlink and realpath using Win32 apiRenaud Paquay2017-08-311-0/+54
| | | | Change-Id: I18452cbb32d24db73601ad10485dbe6bb278731c
* Port os.rename calls to work on WindowsRenaud Paquay2017-05-291-0/+17
| | | | | | | | os.rename fails on Windows if the destination exists, so replace os.rename to platform_utils.rename which handles the platform differences. Change-Id: I15a86f10f65eedee5b003b80f88a0c28a3e1aa48
* Workaround shutil.rmtree limitation on WindowsRenaud Paquay2017-05-291-0/+15
| | | | | | | | | | By default, shutil.rmtree raises an exception when deleting readonly files on Windows. Replace all shutil.rmtree with platform_utils.rmtree, which adds an error handler to make files read-write when they can't be deleted. Change-Id: I9cfea9a7b3703fb16a82cf69331540c2c179ed53
* Add support for creating symbolic links on WindowsRenaud Paquay2017-05-291-0/+43
| | | | | | | | | | | | Replace all calls to os.symlink with platform_utils.symlink. The Windows implementation calls into the CreateSymbolicLinkW Win32 API, as os.symlink is not supported. Separate the Win32 API definitions into a separate module platform_utils_win32 for clarity. Change-Id: I0714c598664c2df93383734e609d948692c17ec5
* Make "git command" and "forall" work on WindowsRenaud Paquay2017-05-291-0/+169
Python on Windows does not support non blocking file operations. To workaround this issue, we instead use Threads and a Queue to simulate non-blocking calls. This is happens only when running with the native Windows version of Python, meaning Linux and Cygwin are not affected by this change. Change-Id: I4ce23827b096c5138f67a85c721f58a12279bb6f