@@ -255,14 +255,25 @@ const Os = switch (builtin.os.tag) {
255
255
overlapped : windows.OVERLAPPED ,
256
256
buffer : [64512 ]u8 align (@alignOf (windows .FILE_NOTIFY_INFORMATION )) = undefined ,
257
257
258
+ extern "kernel32" fn ReadDirectoryChangesW (
259
+ hDirectory : windows.HANDLE ,
260
+ lpBuffer : [* ]align (@alignOf (windows.FILE_NOTIFY_INFORMATION )) u8 ,
261
+ nBufferLength : windows.DWORD ,
262
+ bWatchSubtree : windows.BOOL ,
263
+ dwNotifyFilter : windows.DWORD ,
264
+ lpBytesReturned : ? * windows.DWORD ,
265
+ lpOverlapped : ? * windows.OVERLAPPED ,
266
+ lpCompletionRoutine : windows.LPOVERLAPPED_COMPLETION_ROUTINE ,
267
+ ) callconv (windows .WINAPI ) windows .BOOL ;
268
+
258
269
fn readChanges (self : * @This ()) void {
259
270
const notify_filter =
260
271
windows .FILE_NOTIFY_CHANGE_CREATION |
261
272
windows .FILE_NOTIFY_CHANGE_DIR_NAME |
262
273
windows .FILE_NOTIFY_CHANGE_FILE_NAME |
263
274
windows .FILE_NOTIFY_CHANGE_LAST_WRITE |
264
275
windows .FILE_NOTIFY_CHANGE_SIZE ;
265
- const r = windows . kernel32 . ReadDirectoryChangesW (self .handle , @ptrCast (& self .buffer ), self .buffer .len , 0 , notify_filter , null , & self .overlapped , null );
276
+ const r = ReadDirectoryChangesW (self .handle , @ptrCast (& self .buffer ), self .buffer .len , 0 , notify_filter , null , & self .overlapped , null );
266
277
assert (r != 0 );
267
278
}
268
279
0 commit comments