aboutsummaryrefslogtreecommitdiff
path: root/lib/std/fs
AgeCommit message (Collapse)Author
2020-02-12Switch a bunch of FBA to use testing.allocatorBenjamin Feng
2020-02-10Merge pull request #4404 from ziglang/async-stdAndrew Kelley
a big step towards std lib integration with async I/O
2020-02-08std: fix bitrotted evented codeAndrew Kelley
2020-02-07more carefully calculate llvm field indexesAndrew Kelley
more correctly solves #4403
2020-02-07skip self-hosted for now as we work towards async I/OAndrew Kelley
1. behavior tests with --test-evented-io 2. std lib tests with --test-evented-io 3. fuzz test evented I/O a bit, make it robust 4. make sure it works on all platforms (kqueue, Windows IOCP, epoll/other) 5. restart efforts on self-hosted
2020-02-06more std lib async I/O integrationAndrew Kelley
* `zig test` gainst `--test-evented-io` parameter and gains the ability to seamlessly run async tests. * `std.ChildProcess` opens its child process pipe with O_NONBLOCK when using evented I/O * `std.io.getStdErr()` gives a File that is blocking even in evented I/O mode. * Delete `std.event.fs`. The functionality is now merged into `std.fs` and async file system access (using a dedicated thread) is automatically handled. * `std.fs.File` can be configured to specify whether its handle is expected to block, and whether that is OK to block even when in async I/O mode. This makes async I/O work correctly for e.g. the file system as well as network. * `std.fs.File` has some deprecated functions removed. * Missing readv,writev,pread,pwrite,preadv,pwritev functions are added to `std.os` and `std.fs.File`. They are all integrated with async I/O. * `std.fs.Watch` is still bit rotted and needs to be audited in light of the new async/await syntax. * `std.io.OutStream` integrates with async I/O * linked list nodes in the std lib have default `null` values for `prev` and `next`. * Windows async I/O integration is enabled for reading/writing file handles. * Added `std.os.mode_t`. Integer sizes need to be audited. * Fixed #4403 which was causing compiler to crash. This is working towards: ./zig test ../test/stage1/behavior.zig --test-evented-io Which does not successfully build yet. I'd like to enable behavioral tests and std lib tests with --test-evented-io in the test matrix in the future, to prevent regressions.
2020-02-05std: Rename isAbsoluteW to isAbsoluteWindowsWLemonBoy
2020-02-04std: Fix edge case in isAbsolute fn familyLemonBoy
* Empty strings are not considered absolute paths. * Refactor some common code. Closes #4382
2020-01-31NTSTATUS is a non-exhaustive enumdaurnimator
2020-01-29Promoted "leak_count_allocator" to the main testing.allocatorBenjamin Feng
2020-01-29Create leak_count_allocatorBenjamin Feng
2020-01-29Move debug.global_allocator to testing.allocatorBenjamin Feng
2019-12-29std: sentinel terminated pointers for utf16 apisdaurnimator
2019-12-01Merge remote-tracking branch 'origin/master' into remove-array-type-coercionAndrew Kelley
2019-11-30add missing error code handling on WindowsAndrew Kelley
2019-11-30move `std.fs.Dir.cwd` to `std.fs.cwd`Andrew Kelley
update to non-deprecated std.fs APIs throughout the codebase Related: #3811
2019-11-30introduce std.fs.Dir.openFile and std.fs.Dir.createFileAndrew Kelley
These functions have flags parameters which cover all the use cases. The other functions are now deprecated.
2019-11-27remove type coercion from array values to referencesAndrew Kelley
* Implements #3768. This is a sweeping breaking change that requires many (trivial) edits to Zig source code. Array values no longer coerced to slices; however one may use `&` to obtain a reference to an array value, which may then be coerced to a slice. * Adds `IrInstruction::dump`, for debugging purposes. It's useful to call to inspect the instruction when debugging Zig IR. * Fixes bugs with result location semantics. See the new behavior test cases, and compile error test cases. * Fixes bugs with `@typeInfo` not properly resolving const values. * Behavior tests are passing but std lib tests are not yet. There is more work to do before merging this branch.
2019-11-25more sentinel-terminated pointers std lib integrationAndrew Kelley
See #3767
2019-11-21string literals are now null terminatedAndrew Kelley
this also deletes C string literals from the language, and then makes the std lib changes and compiler changes necessary to get the behavior tests and std lib tests passing again.
2019-11-21std: remove O_LARGEFILE from OS bits when the OS does not define itAndrew Kelley
2019-11-21add std.fs.Dir.openReadAndrew Kelley
This is progress towards file system APIs that encourage avoiding Time Of Check, Time Of Use bugs.
2019-11-08update the codebase to use `@as`Andrew Kelley
2019-11-06allow type coercion from *[0]T to E![]const TAndrew Kelley
This is an unambiguous, safe cast.
2019-10-30Merge branch 'std.net'Andrew Kelley
2019-10-30DragonFlyBSD supportTse
2019-10-30Merge remote-tracking branch 'origin/master' into std.netAndrew Kelley
2019-10-29inline path separator looplukechampine
2019-10-29basic DNS address resolution for linux without libcAndrew Kelley
2019-10-24get rid of std.os.foo.is_the_targetAndrew Kelley
It had the downside of running all the comptime blocks and resolving all the usingnamespaces of each system, when just trying to discover if the current system is a particular one. For Darwin, where it's nice to use `std.Target.current.isDarwin()`, this demonstrates the utility that #425 would provide.
2019-10-23Handle TERM=dumb for stdout/stderrJonathan Marler
2019-10-21[wip] use NtDll APIs on Windows to implement std.fs.DirAndrew Kelley
2019-10-16add docs for std.fs.File.updateTimesAndrew Kelley
2019-10-16Fix compilation of updateTimes on 32bit platformsLemonBoy
Add a test to avoid regressions. Fixes #3412
2019-09-25mv std/ lib/Andrew Kelley
that's all this commit does. further commits will fix cli flags and such. see #2221