improve std/tempfiles (#17920)

* improve std/tempfiles
* fixup
* fix windows
* improve test
* improve runnableExamples and tests
* address comment
This commit is contained in:
Timothee Cour 2021-05-11 07:35:43 -07:00 • committed by GitHub
commit e60672141a
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
3 changed files with 94 additions and 33 deletions

View file

@ -717,13 +717,14 @@ const
FILE_WRITE_DATA* = 0x00000002 # file & pipe
# Error Constants
const
ERROR_FILE_NOT_FOUND* = 2
const
ERROR_FILE_NOT_FOUND* = 2 ## https://docs.microsoft.com/en-us/windows/win32/debug/system-error-codes--0-499-
ERROR_PATH_NOT_FOUND* = 3
ERROR_ACCESS_DENIED* = 5
ERROR_NO_MORE_FILES* = 18
ERROR_LOCK_VIOLATION* = 33
ERROR_HANDLE_EOF* = 38
ERROR_FILE_EXISTS* = 80
ERROR_BAD_ARGUMENTS* = 165
proc duplicateHandle*(hSourceProcessHandle: Handle, hSourceHandle: Handle,