0
Fork 0
mirror of https://codeberg.org/ziglang/zig synced 2026-11-18 07:05:05 +00:00
zig/src-self-hosted
Andrew Kelley 5b1a492012
breaking: improve std.fs directory handling API
* Added `std.c.unlinkat` and `std.os.unlinkat`.
 * Removed `std.fs.MAX_BUF_BYTES` (this declaration never made it to
   master branch)
 * Added `std.fs.Dir.deleteTree` to be used on an open directory handle.
 * `std.fs.deleteTree` has better behavior for both relative and
   absolute paths. For absolute paths, it opens the base directory
   and uses that handle for subsequent operations. For relative paths,
   it does a similar strategy, using the cwd handle.
 * The error set of `std.fs.deleteTree` is improved to no longer have
   these possible errors:
   - OutOfMemory
   - FileTooBig
   - IsDir
   - DirNotEmpty
   - PathAlreadyExists
   - NoSpaceLeft
 * Added `std.fs.Dir.posix_cwd` which is a statically initialized
   directory representing the current working directory.
 * The error set of `std.Dir.open` is improved to no longer have these
   possible errors:
   - FileTooBig
   - IsDir
   - NoSpaceLeft
   - PathAlreadyExists
   - OutOfMemory
 * Added more alternative functions to `std.fs` for when the path
   parameter is a null terminated string. This can sometimes be more
   effecient on systems which have an ABI based on  null terminated
   strings.
 * Added `std.fs.Dir.openDir`, `std.fs.Dir.deleteFile`, and
   `std.fs.Dir.deleteDir` which all operate on an open directory handle.
 * `std.fs.Walker.Entry` now has a `dir` field, which can be used to do
   operations directly on `std.fs.Walker.Entry.basename`, avoiding
   `error.NameTooLong` for deeply nested paths.
 * Added more docs to `std.os.OpenError`

This commit does the POSIX components for these changes. I plan to
follow up shortly with a commit for Windows.
History 2019-10-20 21:48:23 -04:00
..
arg.zig changing occurrences of HashMap with []const u8 as keys for StringHashMap 2019-09-03 23:53:05 +02:00
c.zig run zig fmt to update use to usingnamespace 2019-05-29 19:09:58 -04:00
c_int.zig different array literal syntax when inferring the size 2019-06-09 19:26:32 -04:00
clang.zig update zig codebase to llvm 9 2019-07-17 17:47:39 -04:00
codegen.zig add compile error for ignoring error 2019-03-23 19:33:00 -04:00
compilation.zig changing occurrences of HashMap with []const u8 as keys for StringHashMap 2019-09-03 23:53:05 +02:00
decl.zig changing occurrences of HashMap with []const u8 as keys for StringHashMap 2019-09-03 23:53:05 +02:00
dep_tokenizer.zig Merge pull request #2714 from ziglang/fmt-overhaul 2019-06-25 20:15:33 +12:00
errmsg.zig clean up references to os 2019-05-26 18:32:44 -04:00
introspect.zig different array literal syntax when inferring the size 2019-06-09 19:26:32 -04:00
ir.zig implement new async syntax in self-hosted compiler 2019-08-16 06:17:28 -07:00
libc_installation.zig different array literal syntax when inferring the size 2019-06-09 19:26:32 -04:00
link.zig avoid the word "coroutine", they're "async functions" 2019-08-13 14:14:19 -04:00
llvm.zig Added ZigLLVMCreateTargetMachine and pass function-sections flag 2019-07-02 19:54:29 +02:00
main.zig Use 8192 sized buffers and remove allocator parameters 2019-10-19 14:04:51 -04:00
package.zig changing occurrences of HashMap with []const u8 as keys for StringHashMap 2019-09-03 23:53:05 +02:00
scope.zig self-hosted translate-c emits a hello world AST 2019-04-26 15:43:36 -04:00
stage1.zig breaking: improve std.fs directory handling API 2019-10-20 21:48:23 -04:00
target.zig stage2: update for changes regarding sub-architecture 2019-02-28 14:10:45 -05:00
test.zig Use 8192 sized buffers and remove allocator parameters 2019-10-19 14:04:51 -04:00
translate_c.zig implement new async syntax in self-hosted compiler 2019-08-16 06:17:28 -07:00
type.zig introduce the enum literal type 2019-03-24 00:44:18 -04:00
value.zig std: existing LinkedList is actually a TailQueue 2019-06-10 15:41:40 +10:00
visib.zig New Zig formal grammar (#1685) 2018-11-13 05:08:37 -08:00