fn access(self: Dir, sub_path: []const u8, flags: File.OpenFlags) AccessError!void

Test accessing path. path is UTF-8-encoded. Be careful of Time-Of-Check-Time-Of-Use race conditions when using this function. For example, instead of testing if a file exists and then opening it, just open it and handle the error for file not found.

Parameters

self: Dir,
sub_path: []const u8,
flags: File.OpenFlags,