| ... | @@ -15,7 +15,7 @@ pub const File = struct { | ... | @@ -15,7 +15,7 @@ pub const File = struct { |
| 15 | /// The OS-specific file descriptor or file handle. | 15 | /// The OS-specific file descriptor or file handle. |
| 16 | handle: os.FileHandle, | 16 | handle: os.FileHandle, |
| 17 | | 17 | |
| 18 | const OpenError = os.WindowsOpenError || os.PosixOpenError; | 18 | pub const OpenError = os.WindowsOpenError || os.PosixOpenError; |
| 19 | | 19 | |
| 20 | /// `path` needs to be copied in memory to add a null terminating byte, hence the allocator. | 20 | /// `path` needs to be copied in memory to add a null terminating byte, hence the allocator. |
| 21 | /// Call close to clean up. | 21 | /// Call close to clean up. |
| ... | @@ -289,7 +289,7 @@ pub const File = struct { | ... | @@ -289,7 +289,7 @@ pub const File = struct { |
| 289 | Unexpected, | 289 | Unexpected, |
| 290 | }; | 290 | }; |
| 291 | | 291 | |
| 292 | fn mode(self: *File) ModeError!os.FileMode { | 292 | pub fn mode(self: *File) ModeError!os.FileMode { |
| 293 | if (is_posix) { | 293 | if (is_posix) { |
| 294 | var stat: posix.Stat = undefined; | 294 | var stat: posix.Stat = undefined; |
| 295 | const err = posix.getErrno(posix.fstat(self.handle, &stat)); | 295 | const err = posix.getErrno(posix.fstat(self.handle, &stat)); |
| ... | @@ -364,7 +364,7 @@ pub const File = struct { | ... | @@ -364,7 +364,7 @@ pub const File = struct { |
| 364 | | 364 | |
| 365 | pub const WriteError = os.WindowsWriteError || os.PosixWriteError; | 365 | pub const WriteError = os.WindowsWriteError || os.PosixWriteError; |
| 366 | | 366 | |
| 367 | fn write(self: *File, bytes: []const u8) WriteError!void { | 367 | pub fn write(self: *File, bytes: []const u8) WriteError!void { |
| 368 | if (is_posix) { | 368 | if (is_posix) { |
| 369 | try os.posixWrite(self.handle, bytes); | 369 | try os.posixWrite(self.handle, bytes); |
| 370 | } else if (is_windows) { | 370 | } else if (is_windows) { |