Skip to content

Commit 0736e6a

Browse files
committedJul 19, 2018
std.os.File: add missing pub modifiers
·
0.15.10.3.0
1 parent a9f0681 commit 0736e6a

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed
 

‎std/os/file.zig‎

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,7 @@ pub const File = struct {
1515
/// The OS-specific file descriptor or file handle.
1616
handle: os.FileHandle,
1717

18-
const OpenError = os.WindowsOpenError || os.PosixOpenError;
18+
pub const OpenError = os.WindowsOpenError || os.PosixOpenError;
1919

2020
/// `path` needs to be copied in memory to add a null terminating byte, hence the allocator.
2121
/// Call close to clean up.
@@ -289,7 +289,7 @@ pub const File = struct {
289289
Unexpected,
290290
};
291291

292-
fn mode(self: *File) ModeError!os.FileMode {
292+
pub fn mode(self: *File) ModeError!os.FileMode {
293293
if (is_posix) {
294294
var stat: posix.Stat = undefined;
295295
const err = posix.getErrno(posix.fstat(self.handle, &stat));
@@ -364,7 +364,7 @@ pub const File = struct {
364364

365365
pub const WriteError = os.WindowsWriteError || os.PosixWriteError;
366366

367-
fn write(self: *File, bytes: []const u8) WriteError!void {
367+
pub fn write(self: *File, bytes: []const u8) WriteError!void {
368368
if (is_posix) {
369369
try os.posixWrite(self.handle, bytes);
370370
} else if (is_windows) {

0 commit comments

Comments
 (0)
Please sign in to comment.