#How to access public consts in File.zig

1 messages · Page 1 of 1 (latest)

ashen storm
#

The standard library file File.zig in the fs directory contains the line
pub const WriteError = posix.WriteError;
I'm trying to access this in my code with:
const WriteError = std.fs.WriteError;
but upon attempting compilation, I get the error:

example.zig:26:26: error: root struct of file 'fs' has no member named 'WriteError'
const WriteError = std.fs.WriteError;
                   ~~~~~~^~~~~~~~~~~```
How do I correct this and therefore be able to use `WriteError` in my code?
clear goblet
#

std.fs.File.WriteError