aboutsummaryrefslogtreecommitdiff
path: root/lib/std/os
AgeCommit message (Collapse)Author
2020-07-22Draft out dir symlinks branchJakub Konka
2020-07-22Start drafting CreateSymbolicLink using ntdll syscallsJakub Konka
2020-07-22Ensure Dir.deleteTree does not dereference symlinksJakub Konka
Otherwise, the behaviour can lead to unexpected results, resulting in removing an entire tree that's not necessarily under the root. Furthermore, this change is needed if are to properly handle dir symlinks on Windows. Without explicitly requiring that a directory or file is opened with `FILE_OPEN_REPARSE_POINT`, Windows automatically dereferences all symlinks along the way. This commit adds another option to `OpenDirOptions`, namely `.no_follow`, which defaults to `false` and can be used to specifically open a directory symlink on Windows or call `openat` with `O_NOFOLLOW` flag in POSIX.
2020-07-22Fix Windows buildJakub Konka
2020-07-22Move symlink to fs.symlinkAbsolute with SymlinkFlagsJakub Konka
This way `std.fs.symlinkAbsolute` becomes cross-platform and we can legally include `SymlinkFlags` as an argument that's only used on Windows. Also, now `std.os.symlink` generates a compile error on Windows with a message to instead use `std.os.windows.CreateSymbolicLink`. Finally, this PR also reshuffles the tests between `std.os.test` and `std.fs.test`.
2020-07-22RefactorJakub Konka
2020-07-22Ensure we use Win32 prefix in Win32 callsJakub Konka
2020-07-22Handle relative/absolute symlinks; add more testsJakub Konka
2020-07-22Add smoke test for dir symlinksJakub Konka
2020-07-22Add SymlinkFlags needed to create symlinks to dirs on WinJakub Konka
2020-07-22Fix readlink smoke testJakub Konka
2020-07-22RefactorJakub Konka
2020-07-22Fix unlinkatW to allow file symlink deletion on WindowsJakub Konka
2020-07-22Use NtCreateFile to get handle to reparse pointJakub Konka
2020-07-22Fix incorrect byte format of REPARSE_DATA_BUFFER structJakub Konka
2020-07-22Use windows.CreateFileW to open the reparse pointJakub Konka
2020-07-22Add windows.ReadLink similar to OpenFile but for reparse points onlyJakub Konka
2020-07-22Debug readlinkW using OpenFileJakub Konka
2020-07-22Finish symlink implementation on WindowsJakub Konka
2020-07-22Add readlink smoke testJakub Konka
2020-07-22Start drafting out os.readlink on WindowsJakub Konka
2020-07-20Merge branch 'master' of https://github.com/ziglang/zig into ↵Anthony Arian
5002-fix-entrypoint-with-winmain
2020-07-11run zig fmt on std lib and self hostedVexu
2020-07-01Implement std.os for powerpc64{,le}Shawn Anastasio
2020-06-27Merge pull request #5064 from marler8997/newAllocatorAndrew Kelley
new allocator interface
2020-06-27Move fs-specific tests from os/test.zig to fs/test.zigRyan Liptak
The moved tests do not use `std.os` directly and instead use `std.fs` functions, so it makes more sense for them to be in `fs/test.zig`
2020-06-26new allocator interfaceJonathan Marler
2020-06-24Implement fstatat targeting WASIJakub Konka
Also, add more informative `@compileError` in a few `std.os` functions that would otherwise yield a cryptic compile error when targeting WASI. Finally, enhance docs in a few places and add test case for `fstatat`.
2020-06-22Enhance std.os.readlinkat coverageJakub Konka
Adds Windows stub (still needs to be implemented on Windows), adds WASI implementation, adds unit test testing basic chain of ops: create file -> symlink -> readlink.
2020-06-22Enhance std.os.symlinkat coverageJakub Konka
Fixes `std.os.symlinkat` compile errors, adds Windows stub (still needs to be implemented), adds WASI implementation.
2020-06-21Add errors to windows.WSAStartup and WSACleanupNameless
2020-06-20zig fmtAndrew Kelley
2020-06-15Implement WinMain Callers that Pass Valid ParamsAnthony Arian
2020-06-04std.os.windows.OpenFile: Handle FILE_IS_A_DIRECTORY statusRyan Liptak
Fixes #5533
2020-06-04Windows: Handle ERROR_DIRECTORY in std.fs.deleteDirAbsolute when called on a ↵Ryan Liptak
file path ERROR_DIRECTORY (267) is returned from kernel32.RemoveDirectoryW if the path is not a directory. Note also that os.DirectDirError already includes NotDir Before: error.Unexpected: GetLastError(267): The directory name is invalid. After: error: NotDir
2020-06-02cleanupsAndrew Kelley
* improve docs * add TODO comments for things that don't have open issues * remove redundant namespacing of struct fields * guard against ioctl returning EINTR * remove the general std.os.ioctl function in favor of the specific ioctl_SIOCGIFINDEX function. This allows us to have a more precise error set, and more type-safe API.
2020-06-02Change ioctl's request type to i32Luna
2020-06-02Replace syscall3 to os.ioctlLuna
2020-06-02Add std.os.ioctlLuna
2020-06-02Make ifru fields sentinel-terminatedLuna
2020-06-02Replace C types in declarationsLuna
2020-06-02Replace C shorts by integer typesLuna
2020-06-02Fix ifreq definitionLuna
2020-06-02Only resolve scope id when neededLuna
2020-06-02Add some interface structs to linux bitsLuna
2020-06-01Merge pull request #5475 from marler8997/windowsDnsAndrew Kelley
support name resolution on windows
2020-06-01Fix evented builds on windows with runtime safety onAlexandros Naskos
2020-05-31more windows network fixesJonathan Marler
* support posix SOCK_NONBLOCK and SOCK_CLOEXEC flags on windows * fix bugs in os.socket and os.connect to return at the correct place
2020-05-31Merge pull request #5478 from vrischmann/fix-iouringVeikka Tuominen
linux: fix IOSQE_BIT decl and io_uring_sqe flags
2020-05-30linux: fix IOSQE_BIT decl and io_uring_sqe flagsVincent Rischmann