@@ -1157,9 +1157,9 @@ pub const Dir = struct {
11571157 else
11581158 0 ;
11591159 os_flags |= switch (flags .lock ) {
1160- .None = > @as (u32 , 0 ),
1161- .Shared = > os .O .SHLOCK | nonblocking_lock_flag ,
1162- .Exclusive = > os .O .EXLOCK | nonblocking_lock_flag ,
1160+ .none = > @as (u32 , 0 ),
1161+ .shared = > os .O .SHLOCK | nonblocking_lock_flag ,
1162+ .exclusive = > os .O .EXLOCK | nonblocking_lock_flag ,
11631163 };
11641164 }
11651165 if (@hasDecl (os .O , "LARGEFILE" )) {
@@ -1182,13 +1182,13 @@ pub const Dir = struct {
11821182 // WASI doesn't have os.flock so we intetinally check OS prior to the inner if block
11831183 // since it is not compiltime-known and we need to avoid undefined symbol in Wasm.
11841184 if (builtin .target .os .tag != .wasi ) {
1185- if (! has_flock_open_flags and flags .lock != .None ) {
1185+ if (! has_flock_open_flags and flags .lock != .none ) {
11861186 // TODO: integrate async I/O
11871187 const lock_nonblocking = if (flags .lock_nonblocking ) os .LOCK .NB else @as (i32 , 0 );
11881188 try os .flock (fd , switch (flags .lock ) {
1189- .None = > unreachable ,
1190- .Shared = > os .LOCK .SH | lock_nonblocking ,
1191- .Exclusive = > os .LOCK .EX | lock_nonblocking ,
1189+ .none = > unreachable ,
1190+ .shared = > os .LOCK .SH | lock_nonblocking ,
1191+ .exclusive = > os .LOCK .EX | lock_nonblocking ,
11921192 });
11931193 }
11941194 }
@@ -1241,9 +1241,9 @@ pub const Dir = struct {
12411241 const range_off : w.LARGE_INTEGER = 0 ;
12421242 const range_len : w.LARGE_INTEGER = 1 ;
12431243 const exclusive = switch (flags .lock ) {
1244- .None = > return file ,
1245- .Shared = > false ,
1246- .Exclusive = > true ,
1244+ .none = > return file ,
1245+ .shared = > false ,
1246+ .exclusive = > true ,
12471247 };
12481248 try w .LockFile (
12491249 file .handle ,
@@ -1320,9 +1320,9 @@ pub const Dir = struct {
13201320 else
13211321 0 ;
13221322 const lock_flag : u32 = if (has_flock_open_flags ) switch (flags .lock ) {
1323- .None = > @as (u32 , 0 ),
1324- .Shared = > os .O .SHLOCK | nonblocking_lock_flag ,
1325- .Exclusive = > os .O .EXLOCK | nonblocking_lock_flag ,
1323+ .none = > @as (u32 , 0 ),
1324+ .shared = > os .O .SHLOCK | nonblocking_lock_flag ,
1325+ .exclusive = > os .O .EXLOCK | nonblocking_lock_flag ,
13261326 } else 0 ;
13271327
13281328 const O_LARGEFILE = if (@hasDecl (os .O , "LARGEFILE" )) os .O .LARGEFILE else 0 ;
@@ -1339,13 +1339,13 @@ pub const Dir = struct {
13391339 // WASI doesn't have os.flock so we intetinally check OS prior to the inner if block
13401340 // since it is not compiltime-known and we need to avoid undefined symbol in Wasm.
13411341 if (builtin .target .os .tag != .wasi ) {
1342- if (! has_flock_open_flags and flags .lock != .None ) {
1342+ if (! has_flock_open_flags and flags .lock != .none ) {
13431343 // TODO: integrate async I/O
13441344 const lock_nonblocking = if (flags .lock_nonblocking ) os .LOCK .NB else @as (i32 , 0 );
13451345 try os .flock (fd , switch (flags .lock ) {
1346- .None = > unreachable ,
1347- .Shared = > os .LOCK .SH | lock_nonblocking ,
1348- .Exclusive = > os .LOCK .EX | lock_nonblocking ,
1346+ .none = > unreachable ,
1347+ .shared = > os .LOCK .SH | lock_nonblocking ,
1348+ .exclusive = > os .LOCK .EX | lock_nonblocking ,
13491349 });
13501350 }
13511351 }
@@ -1402,9 +1402,9 @@ pub const Dir = struct {
14021402 const range_off : w.LARGE_INTEGER = 0 ;
14031403 const range_len : w.LARGE_INTEGER = 1 ;
14041404 const exclusive = switch (flags .lock ) {
1405- .None = > return file ,
1406- .Shared = > false ,
1407- .Exclusive = > true ,
1405+ .none = > return file ,
1406+ .shared = > false ,
1407+ .exclusive = > true ,
14081408 };
14091409 try w .LockFile (
14101410 file .handle ,
0 commit comments