aboutsummaryrefslogtreecommitdiff
path: root/lib/std/Io/File.zig
diff options
context:
space:
mode:
authorAndrew Kelley <andrew@ziglang.org>2025-12-06 21:06:30 -0800
committerAndrew Kelley <andrew@ziglang.org>2025-12-23 22:15:08 -0800
commit916998315967f73c91e682e9ea05dd3232818654 (patch)
tree6cd1ee9b952441c6b6ea1ddbad17a5cfd4b5f860 /lib/std/Io/File.zig
parent877032ec6a0007316f42658d12042f1473de4856 (diff)
downloadzig-916998315967f73c91e682e9ea05dd3232818654.tar.gz
zig-916998315967f73c91e682e9ea05dd3232818654.zip
std.fs: migrate most of the API elsewhere
Diffstat (limited to 'lib/std/Io/File.zig')
-rw-r--r--lib/std/Io/File.zig22
1 files changed, 6 insertions, 16 deletions
diff --git a/lib/std/Io/File.zig b/lib/std/Io/File.zig
index b24c0b5100..8e71f648e2 100644
--- a/lib/std/Io/File.zig
+++ b/lib/std/Io/File.zig
@@ -489,22 +489,6 @@ pub const WriteFileStreamingError = error{
SystemResources,
} || Io.Cancelable || Io.UnexpectedError;
-/// Opens a file for reading or writing, without attempting to create a new
-/// file, based on an absolute path.
-///
-/// Returns an open resource to be released with `close`.
-///
-/// Asserts that the path is absolute. See `Dir.openFile` for a function that
-/// operates on both absolute and relative paths.
-///
-/// On Windows, `absolute_path` should be encoded as [WTF-8](https://wtf-8.codeberg.page/).
-/// On WASI, `absolute_path` should be encoded as valid UTF-8.
-/// On other platforms, `absolute_path` is an opaque sequence of bytes with no particular encoding.
-pub fn openAbsolute(io: Io, absolute_path: []const u8, flags: OpenFlags) OpenError!File {
- assert(std.fs.path.isAbsolute(absolute_path));
- return Io.Dir.cwd().openFile(io, absolute_path, flags);
-}
-
pub const SeekError = error{
Unseekable,
/// The file descriptor does not hold the required rights to seek on it.
@@ -579,3 +563,9 @@ pub const DowngradeLockError = Io.Cancelable || Io.UnexpectedError;
pub fn downgradeLock(file: File, io: Io) LockError!void {
return io.vtable.fileDowngradeLock(io.userdata, file);
}
+
+test {
+ _ = Reader;
+ _ = Writer;
+ _ = Atomic;
+}