can anyone tell me if `File.writeBytes()` is async...
# announcements
m
can anyone tell me if
File.writeBytes()
is async?
k
Depends on what you mean by async here.
h
When I check here I don't see that it is
but you can go further and check if the write method itself is async or not
k
It's a native method.
h
From async, I believe he means if the code is processed on main thread or background thread
k
Well there's probably buffering by the OS at least. But why does that matter?
h
Isn't he asking for that ?
What else async mean ?
m
i change permissions of the newly created file immediately after, so i’m worried it won’t be finished flushing the buffer
k
You don't need to worry about that, all of that is handled at a way lower level.
There should be no observable differences.
👍 1
m
thanks