diff options
| author | Andrew Kelley <superjoe30@gmail.com> | 2018-07-19 13:06:13 -0400 |
|---|---|---|
| committer | Andrew Kelley <superjoe30@gmail.com> | 2018-07-19 13:06:13 -0400 |
| commit | 0736e6aa347f065c15c7acaa0a7d2cc61b85bba6 (patch) | |
| tree | b441140ca415d61f6056e0ef1236fca178fe6cbf | |
| parent | a9f0681f85679b602cd5f322f6b9b4b2d18a5c4a (diff) | |
| download | zig-0736e6aa347f065c15c7acaa0a7d2cc61b85bba6.tar.gz zig-0736e6aa347f065c15c7acaa0a7d2cc61b85bba6.zip | |
std.os.File: add missing pub modifiers
| -rw-r--r-- | std/os/file.zig | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/std/os/file.zig b/std/os/file.zig index 055f185121..c160e90e0e 100644 --- a/std/os/file.zig +++ b/std/os/file.zig @@ -15,7 +15,7 @@ pub const File = struct { /// The OS-specific file descriptor or file handle. handle: os.FileHandle, - const OpenError = os.WindowsOpenError || os.PosixOpenError; + pub const OpenError = os.WindowsOpenError || os.PosixOpenError; /// `path` needs to be copied in memory to add a null terminating byte, hence the allocator. /// Call close to clean up. @@ -289,7 +289,7 @@ pub const File = struct { Unexpected, }; - fn mode(self: *File) ModeError!os.FileMode { + pub fn mode(self: *File) ModeError!os.FileMode { if (is_posix) { var stat: posix.Stat = undefined; const err = posix.getErrno(posix.fstat(self.handle, &stat)); @@ -364,7 +364,7 @@ pub const File = struct { pub const WriteError = os.WindowsWriteError || os.PosixWriteError; - fn write(self: *File, bytes: []const u8) WriteError!void { + pub fn write(self: *File, bytes: []const u8) WriteError!void { if (is_posix) { try os.posixWrite(self.handle, bytes); } else if (is_windows) { |
