It works for OneDrive. Well the way I have it set up on this machine anyway. On this machine to write to OneDrive it writes to a local drive which then syncs to OneDrive. I can apply the setting to the OneDrive folder in explorer (which in a physical sense is a local folder. So yes works (on this machine).
Need to update my laptop at some point. I don't store all OneDrive files locally on the laptop so that might be different.