File tree Expand file tree Collapse file tree 1 file changed +3
-3
lines changed Expand file tree Collapse file tree 1 file changed +3
-3
lines changed Original file line number Diff line number Diff line change @@ -15,7 +15,7 @@ pub const File = struct {
15
15
/// The OS-specific file descriptor or file handle.
16
16
handle : os.FileHandle ,
17
17
18
- const OpenError = os .WindowsOpenError || os .PosixOpenError ;
18
+ pub const OpenError = os .WindowsOpenError || os .PosixOpenError ;
19
19
20
20
/// `path` needs to be copied in memory to add a null terminating byte, hence the allocator.
21
21
/// Call close to clean up.
@@ -289,7 +289,7 @@ pub const File = struct {
289
289
Unexpected ,
290
290
};
291
291
292
- fn mode (self : * File ) ModeError ! os.FileMode {
292
+ pub fn mode (self : * File ) ModeError ! os.FileMode {
293
293
if (is_posix ) {
294
294
var stat : posix.Stat = undefined ;
295
295
const err = posix .getErrno (posix .fstat (self .handle , & stat ));
@@ -364,7 +364,7 @@ pub const File = struct {
364
364
365
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
368
if (is_posix ) {
369
369
try os .posixWrite (self .handle , bytes );
370
370
} else if (is_windows ) {
You can’t perform that action at this time.
0 commit comments